Bugzilla – Bug 106
Fix the definition of ambiguous ampersand, and allow quoted attributes to end in ampersands.
Last modified: 2008-03-13 16:21:57 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>&</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>&</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 ('<'), or another U+0026 AMPERSAND (<code>&</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 (&)</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 (").</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 (&)</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 (&)</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 (>)</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>