diff options
author | Matt Butcher <[email protected]> | 2013-04-13 13:28:56 -0500 |
---|---|---|
committer | Matt Butcher <[email protected]> | 2013-04-13 13:28:56 -0500 |
commit | 9457e0951ebc69238917c7178c015f0c9bf68d62 (patch) | |
tree | ed38face7b664524c4808befd1a0c194a6174dae | |
parent | 444e4b929f403722e5a2c8e4c79584a1f06e9fc1 (diff) |
Fixed CDATA termination.
-rw-r--r-- | src/HTML5/Parser/Tokenizer.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/HTML5/Parser/Tokenizer.php b/src/HTML5/Parser/Tokenizer.php index d8676c5..bf484bd 100644 --- a/src/HTML5/Parser/Tokenizer.php +++ b/src/HTML5/Parser/Tokenizer.php @@ -242,11 +242,13 @@ class Tokenizer { $this->scanner->next(); // Next char. return $this->comment(); } + // Doctype elseif($tok == 'D') { - $this->doctype(); + return $this->doctype(); } + // CDATA section elseif($tok == '[') { - $this->cdataSection(); + return $this->cdataSection(); } // FINISH @@ -451,6 +453,9 @@ class Tokenizer { } while (!$this->isCdataClose()); + $this->scanner->next(); // consume > + $this->scanner->next(); // Next char after > + $this->events->cdata($cdata); return TRUE; |