Skip to content

Commit

Permalink
[e] (0) Fix </form> handling for the case where the tag isn't matched…
Browse files Browse the repository at this point in the history
…. (credit: tt)

git-svn-id: http://svn.whatwg.org/webapps@2505 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Dec 2, 2008
1 parent daa336b commit 37a74d9
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 19 deletions.
21 changes: 12 additions & 9 deletions index
Expand Up @@ -48664,24 +48664,27 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<dt>An end tag whose tag name is "form"</dt>
<dd>

<p>Let <var title="">node</var> be the element that the
<a href=#form-element-pointer><code title="">form</code> element pointer</a> is set
to.</p>

<p>Set the <a href=#form-element-pointer><code title="">form</code> element pointer</a>
to null.</p>

<p>If the <a href=#stack-of-open-elements>stack of open elements</a> does not <a href=#has-an-element-in-scope title="has an element in scope">have an element in scope</a>
with the same tag name as that of the token, then this is a
<a href=#parse-error>parse error</a>; ignore the token.</p>
<p>If <var title="">node</var> is null or the <a href=#stack-of-open-elements>stack of open
elements</a> does not <a href=#has-an-element-in-scope title="has an element in
scope">have <var title="">node</var> in scope</a>, then this is
a <a href=#parse-error>parse error</a>; ignore the token.</p>

<p>Otherwise, run these steps:</p>

<ol><li><p><a href=#generate-implied-end-tags>Generate implied end tags</a>.</li>

<li><p>If the <a href=#current-node>current node</a> is not an element with
the same tag name as that of the token, then this is a
<a href=#parse-error>parse error</a>.</li>
<li><p>If the <a href=#current-node>current node</a> is not <var title="">node</var>, then this is a <a href=#parse-error>parse
error</a>.</li>

<li><p>Pop elements from the <a href=#stack-of-open-elements>stack of open elements</a>
until an element with the same tag name as the token has been
popped from the stack.</li>
<li><p>Remove <var title="">node</var> from the <a href=#stack-of-open-elements>stack of
open elements</a>.</li>

</ol></dd>

Expand Down
23 changes: 13 additions & 10 deletions source
Expand Up @@ -55473,27 +55473,30 @@ interface <dfn>MessageChannel</dfn> {
<dt>An end tag whose tag name is "form"</dt>
<dd>

<p>Let <var title="">node</var> be the element that the
<span><code title="">form</code> element pointer</span> is set
to.</p>

<p>Set the <span><code title="">form</code> element pointer</span>
to null.</p>

<p>If the <span>stack of open elements</span> does not <span
title="has an element in scope">have an element in scope</span>
with the same tag name as that of the token, then this is a
<span>parse error</span>; ignore the token.</p>
<p>If <var title="">node</var> is null or the <span>stack of open
elements</span> does not <span title="has an element in
scope">have <var title="">node</var> in scope</span>, then this is
a <span>parse error</span>; ignore the token.</p>

<p>Otherwise, run these steps:</p>

<ol>

<li><p><span>Generate implied end tags</span>.</p></li>

<li><p>If the <span>current node</span> is not an element with
the same tag name as that of the token, then this is a
<span>parse error</span>.</p></li>
<li><p>If the <span>current node</span> is not <var
title="">node</var>, then this is a <span>parse
error</span>.</p></li>

<li><p>Pop elements from the <span>stack of open elements</span>
until an element with the same tag name as the token has been
popped from the stack.</p></li>
<li><p>Remove <var title="">node</var> from the <span>stack of
open elements</span>.</p></li>

</ol>

Expand Down

0 comments on commit 37a74d9

Please sign in to comment.