Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5aeccac

Browse files
author
Edward Z. Yang ext:(%22)
committed
Add XERROR note w.r.t. relaxed parse error constraints.
1 parent ceac41b commit 5aeccac

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

library/HTML5/Tokenizer.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2229,6 +2229,16 @@ private function consumeCharacterReference($allowed = false, $inattr = false) {
22292229
/* If no match can be made, then this is a parse error.
22302230
No characters are consumed, and nothing is returned. */
22312231
if (!$codepoint) {
2232+
// XERROR: per r3146 this doesn't always result in a
2233+
// parse error
2234+
/* If the current state is not the character reference in
2235+
* attribute value state, or the U+0026 AMPERSAND character is
2236+
* not followed by one or more characters in the ranges U+0030
2237+
* DIGIT ZERO to U+0039 DIGIT NINE, U+0041 LATIN CAPITAL LETTER
2238+
* A to U+005A LATIN CAPITAL LETTER Z, and U+0061 LATIN SMALL
2239+
* LETTER A to U+007A LATIN SMALL LETTER Z, followed by a
2240+
* U+003D EQUALS SIGN character (=), then this is also a parse
2241+
* error. */
22322242
$this->emitToken(array(
22332243
'type' => self::PARSEERROR,
22342244
'data' => 'expected-named-entity'

0 commit comments

Comments
 (0)