This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10055 - </html> and </body> in "in foreign content" cause severe badness
Summary: </html> and </body> in "in foreign content" cause severe badness
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P1 critical
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-30 09:32 UTC by Henri Sivonen
Modified: 2010-10-04 14:48 UTC (History)
4 users (show)

See Also:


Attachments

Description Henri Sivonen 2010-06-30 09:32:17 UTC
Consider
<math></html>
and
<dl><svg><foreignObject><div><math></body><foo>

If there are allowed to transition the primary insertion mode to "after body" with no other spec changes, the tree builder ends up in "after body" with non-HTML content on the stack, which (obviously) can't be good.

OTOH, if the primary insertion point stays in 'in foreign content', the loop under "An end tag, if the current node is not an element in the HTML namespace." in "in foreign content" lets </body> pop the body element off the stack (so that <foo> becomes the next sibling of body in the second example) and lets </html> pop all element off the stack, which means that a fundamental invariant of the parsing algorithm is violated.

Suggested fix: Ignore "html" and "body" end tag tokens in the "in foreign content" mode.
Comment 1 Ian 'Hixie' Hickson 2010-07-14 18:54:20 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Partially Accepted
Change Description: no spec change
Rationale: This seems to have been fixed already, though not as suggested.