summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/HTML5/Parser/Tokenizer.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/HTML5/Parser/Tokenizer.php b/src/HTML5/Parser/Tokenizer.php
index d08cba4..b413b52 100644
--- a/src/HTML5/Parser/Tokenizer.php
+++ b/src/HTML5/Parser/Tokenizer.php
@@ -124,8 +124,10 @@ class Tokenizer
// Character reference
$this->characterReference();
+ $tok = $this->scanner->current();
+
// Parse tag
- if ($this->scanner->current() === '<') {
+ if ($tok === '<') {
// Any buffered text data can go out now.
$this->flushBuffer();
@@ -138,10 +140,11 @@ class Tokenizer
// This always returns false.
|| $this->parseError("Illegal tag opening")
|| $this->characterData();
+
+ $tok = $this->scanner->current();
}
// Handle end of document
- $tok = $this->scanner->current();
$this->eof($tok);
// Parse character