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 10118 - in foreign content "current node is not an element in the HTML namespace" algorithm is wrong
Summary: in foreign content "current node is not an element in the HTML namespace" alg...
Status: VERIFIED DUPLICATE of bug 9580
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: Other other
: P1 critical
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-09 05:17 UTC by contributor
Modified: 2010-10-22 10:32 UTC (History)
6 users (show)

See Also:


Attachments

Description contributor 2010-07-09 05:17:16 UTC
Section: http://www.whatwg.org/specs/web-apps/current-work/#scriptForeignEndTag

Comment:
in foreign content "current node is not an element in the HTML namespace"
algorithm is wrong

Posted from: 32.174.15.54
Comment 1 Eric Seidel 2010-07-09 05:20:04 UTC
Testcase: "<svg></table>"

Algorithm per the spec:

An end tag, if the current node is not an element in the HTML namespace.

Run these steps:

1. Initialize node to be the current node (the bottommost node of the stack).

2. If node is not an element with the same tag name as the token, then this is a parse error.

3. Loop: If node has the same tag name as the token, pop elements from the stack of open elements until node has been popped from the stack, and then abort these steps.

4. Set node to the previous entry in the stack of open elements.

5. If node is an element in the HTML namespace, process the token using the rules for the secondary insertion mode. If, after doing so, the insertion mode is still "in foreign content", but there is no element in scope that has a namespace other than the HTML namespace, switch the insertion mode to the secondary insertion mode.

6. Return to the step labeled loop.

It seems that step 2. should have an "abort these steps" after it.   Otherwise the steps will just walk off the bottom end of the stack looking for a <table> element.
Comment 2 Henri Sivonen 2010-07-09 06:05:19 UTC

*** This bug has been marked as a duplicate of bug 9580 ***