Skip to content
Permalink
Browse files

[e] (0) Fix </form> handling for the case where the tag isn't matched…

…. (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 37a74d9ab40fd8814b5e726560b466a32f49e1dc
Showing with 25 additions and 19 deletions.
  1. +12 −9 index
  2. +13 −10 source
21 index
<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>

23 source
<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>

0 comments on commit 37a74d9

Please sign in to comment.
You can’t perform that action at this time.