NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 141 - Fix some bugs where an end-of-file token in the fragment case would either never terminate the parser or would terminate with parse errors that shouldn't be
Fix some bugs where an end-of-file token in the fragment case would either ne...
Status: RESOLVED INTENTIONAL
Product: Validator.nu
Classification: Unclassified
Component: HTML parser
HEAD
All All
: P2 normal
Assigned To: Henri Sivonen
http://svn.whatwg.org/webapps/source?...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-10 15:52 CET by Nobody
Modified: 2008-03-11 18:58 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nobody 2008-03-10 15:52:49 CET
Index: source
===================================================================
--- source	(revision 1361)
+++ source	(revision 1362)
@@ -39116,6 +39116,8 @@
    <dt>Anything else</dt>
    <dd>
 
+    <!-- can't get here with an EOF and a fragment case -->
+
     <p>Act as if an end tag token with the tag name "head" had
     been seen, and reprocess the current token.</p>
 
@@ -39187,9 +39189,13 @@
 
    <dt>Anything else</dt>
    <dd>
+
+    <!-- can't get here with an EOF and a fragment case -->
+
     <p><span>Parse error</span>. Act as if an end tag with the tag
     name "noscript" had been seen and reprocess the current
     token.</p>
+
    </dd>
 
   </dl>
@@ -40719,6 +40725,18 @@
     <p><span>Parse error</span>. Ignore the token.</p>
    </dd>
 
+   <dt>An end-of-file token</dt>
+   <dd>
+
+    <p>If the <span>current node</span> is the root <code>html</code>
+    element, then <span>stop parsing</span>. (<span>fragment
+    case</span>)</p>
+
+    <p>Otherwise, act as described in the "anything else" entry
+    below.</p>
+
+   </dd>
+
    <dt>Anything else</dt>
    <dd>
 
@@ -41155,7 +41173,16 @@
 
    <dt>An end-of-file token</dt>
    <dd>
-    <p><span>Parse error</span>. <span>Stop parsing</span>.</p>
+
+    <p>If the <span>current node</span> is not the root
+    <code>html</code> element, then this is a <span>parse
+    error.</span>.</p>
+
+    <p class="note">It can only be the <span>current node</span> in
+    the <span>fragment case</span>.</p>
+
+    <p><span>Stop parsing.</span></p>
+
    </dd>
 
    <dt>Anything else</dt>
@@ -41349,7 +41376,16 @@
 
    <dt>An end-of-file token</dt>
    <dd>
-    <p><span>Parse error</span>. <span>Stop parsing.</span></p>
+
+    <p>If the <span>current node</span> is not the root
+    <code>html</code> element, then this is a <span>parse
+    error.</span>.</p>
+
+    <p class="note">It can only be the <span>current node</span> in
+    the <span>fragment case</span>.</p>
+
+    <p><span>Stop parsing.</span></p>
+
    </dd>
 
    <dt>Anything else</dt>
Comment 1 Henri Sivonen 2008-03-11 18:58:27 CET
already taken care of