NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 106 - Fix the definition of ambiguous ampersand, and allow quoted attributes to end in ampersands.
Fix the definition of ambiguous ampersand, and allow quoted attributes to end...
Status: RESOLVED FIXED
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-03 13:12 CET by Nobody
Modified: 2008-03-13 16:21 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-03 13:12:33 CET
Index: source
===================================================================
--- source	(revision 1295)
+++ source	(revision 1296)
@@ -35397,10 +35397,10 @@
 
   <p>An <dfn title="syntax-ambiguous-ampersand">ambiguous
   ampersand</dfn> is a U+0026 AMPERSAND (<code>&amp;</code>) character
-  that is not the last character in the file, that is not followed by
-  a <span>space character</span>, that is not followed by a start tag
-  that has not been omitted, and that is not followed by another
-  U+0026 AMPERSAND (<code>&amp;</code>) character.</p>
+  that is followed by some <span title="syntax-text">text</span> other
+  than a <span>space character</span>, a U+003C LESS-THAN SIGN
+  character ('&lt'), or another U+0026 AMPERSAND (<code>&amp;</code>)
+  character.</p>
 
 
   <h4>Comments</h4>
@@ -36286,7 +36286,8 @@
     <p><em>(This cannot happen if the <span>content model flag</span>
     is set to the CDATA state.)</em></p>
 
-    <p>Attempt to <span>consume an entity</span>.</p>
+    <p>Attempt to <span>consume an entity</span>, with no
+    <span>additional allowed character</span>.</p>
 
     <p>If nothing is returned, emit a U+0026 AMPERSAND character
     token.</p>
@@ -36691,7 +36692,9 @@
      <dd>Switch to the <span>before attribute name state</span>.</dd>
 
      <dt>U+0026 AMPERSAND (&amp;)</dt>
-     <dd>Switch to the <span>entity in attribute value state</span>.</dd>
+     <dd>Switch to the <span>entity in attribute value state</span>,
+     with the <span>additional allowed character</span> being U+0022
+     QUOTATION MARK (&quot;).</dd>
 
      <dt>EOF</dt>
      <dd><span>Parse error</span>. Emit the current tag
@@ -36719,7 +36722,9 @@
      <dd>Switch to the <span>before attribute name state</span>.</dd>
 
      <dt>U+0026 AMPERSAND (&amp;)</dt>
-     <dd>Switch to the <span>entity in attribute value state</span>.</dd>
+     <dd>Switch to the <span>entity in attribute value state</span>,
+     with the <span>additional allowed character</span> being U+0027
+     APOSTROPHE (').</dd>
 
      <dt>EOF</dt>
      <dd><span>Parse error</span>. Emit the current tag
@@ -36752,7 +36757,8 @@
      <dd>Switch to the <span>before attribute name state</span>.</dd>
 
      <dt>U+0026 AMPERSAND (&amp;)</dt>
-     <dd>Switch to the <span>entity in attribute value state</span>.</dd>
+     <dd>Switch to the <span>entity in attribute value state</span>,
+     with no <span>additional allowed character</span>.</dd>
 
      <dt>U+003E GREATER-THAN SIGN (&gt;)</dt>
      <dd>Emit the current tag token. Switch to the <span>data
@@ -37453,6 +37459,7 @@
    <dt>U+003C LESS-THAN SIGN</dt>
    <dt>U+0026 AMPERSAND</dt>
    <dt>EOF</dt>
+   <dt>The <dfn>additional allowed character</dfn>, if there is one</dt>
 
    <dd>Not an entity. No characters are consumed, and nothing is
    returned. (This is not an error, either.)</dd>