We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 182f34d + ced5b84 commit f24a609Copy full SHA for f24a609
src/HTML5/Parser/Tokenizer.php
@@ -163,15 +163,21 @@ protected function consumeData()
163
break;
164
165
default:
166
- if ('<' !== $tok && '&' !== $tok) {
167
- // NULL character
168
- if ("\00" === $tok) {
169
- $this->parseError('Received null character.');
170
- }
+ if ('<' === $tok || '&' === $tok) {
+ break;
+ }
+
+ // NULL character
171
+ if ("\00" === $tok) {
172
+ $this->parseError('Received null character.');
173
174
$this->text .= $tok;
175
$this->scanner->consume();
176
177
178
}
179
180
+ $this->text .= $this->scanner->charsUntil("<&\0");
181
182
183
0 commit comments