diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/HTML5/Parser/Tokenizer.php | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/HTML5/Parser/Tokenizer.php b/src/HTML5/Parser/Tokenizer.php index 0fd1ee7..300a446 100644 --- a/src/HTML5/Parser/Tokenizer.php +++ b/src/HTML5/Parser/Tokenizer.php @@ -1181,16 +1181,11 @@ class Tokenizer return $entity; } - // If in an attribute, then failing to match ; means unconsume the - // entire string. Otherwise, failure to match is an error. - if ($inAttribute) { - $this->scanner->unconsume($this->scanner->position() - $start); - - return '&'; - } + // Failing to match ; means unconsume the entire string. + $this->scanner->unconsume($this->scanner->position() - $start); $this->parseError('Expected &ENTITY;, got &ENTITY%s (no trailing ;) ', $tok); - return '&' . $entity; + return '&'; } } |