HTML5 Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/4803

SVNBugCommentTime (UTC)
48038767[Gecko] [Internet Explorer] [Opera] [Webkit] Handle missing foreign content end tags and SVG </font> and </a> end tags in foreign content.2010-02-25 02:10
Index: source
===================================================================
--- source	(revision 4802)
+++ source	(revision 4803)
@@ -88844,6 +88844,49 @@
 
    </dd>
 
+   <dt>An end tag, if the <span>current node</span> is not an element in the <span>HTML namespace</span>.</dt>
+
+   <dd>
+
+    <p>Run these steps:</p>
+
+    <ol>
+
+     <li><p>Initialize <var title="">node</var> to be the <span>current
+     node</span> (the bottommost node of the stack).</p></li>
+
+     <li><p>If <var title="">node</var> is not an element with the
+     same tag name as the token, then this is a <span>parse
+     error</span>.</p></li>
+
+     <li><p><i>Loop</i>: If <var title="">node</var> has the same tag
+     name as the token, pop elements from the <span>stack of
+     open elements</span> until <var title="">node</var> has been
+     popped from the stack, and then abort these steps.</p></li>
+
+     <li><p>Set <var title="">node</var> to the previous entry in the
+     <span>stack of open elements</span>.</p></li>
+
+     <li>
+
+      <p>If <var title="">node</var> is an element in the <span>HTML
+      namespace</span>, process the token <span>using the rules
+      for</span> the <span>secondary insertion mode</span>. If, after
+      doing so, the <span>insertion mode</span> is still "<span
+      title="insertion mode: in foreign content">in foreign
+      content</span>", but there is no element <span title="has an
+      element in scope">in scope</span> that has a namespace other
+      than the <span>HTML namespace</span>, switch the <span>insertion
+      mode</span> to the <span>secondary insertion mode</span>.</p>
+
+     </li>
+
+     <li><p>Return to the step labeled <i>loop</i>.</p></li>
+
+    </ol>    
+
+   </dd>
+
    <dt>A start tag whose tag name is neither "mglyph" nor "malignmark", if the <span>current node</span> is an <code title="">mi</code> element in the <span>MathML namespace</span>.</dt>
    <dt>A start tag whose tag name is neither "mglyph" nor "malignmark", if the <span>current node</span> is an <code title="">mo</code> element in the <span>MathML namespace</span>.</dt>
    <dt>A start tag whose tag name is neither "mglyph" nor "malignmark", if the <span>current node</span> is an <code title="">mn</code> element in the <span>MathML namespace</span>.</dt>
@@ -88854,7 +88897,7 @@
    <dt>A start tag, if the <span>current node</span> is a <code title="">desc</code> element in the <span>SVG namespace</span>.</dt>
    <dt>A start tag, if the <span>current node</span> is a <code title="">title</code> element in the <span>SVG namespace</span>.</dt>
    <dt>A start tag, if the <span>current node</span> is an element in the <span>HTML namespace</span>.</dt>
-   <dt>An end tag</dt>
+   <dt>Any other end tag</dt>
    <dd>
 
     <p>Process the token <span>using the rules for</span> the

|