diff options
author | Technosophos <[email protected]> | 2013-04-12 17:53:01 -0500 |
---|---|---|
committer | Technosophos <[email protected]> | 2013-04-12 17:53:01 -0500 |
commit | ffcfa507b081cf132db5b90c26bfad66d79a4eb4 (patch) | |
tree | 6379c5433eba61a2d71b20a9b4012f52c9dc82dd /src/HTML5 | |
parent | 1fdc03495c7702422638941235fde4fa3f327232 (diff) |
DOCTYPE bogus comments handled.
Diffstat (limited to 'src/HTML5')
-rw-r--r-- | src/HTML5/Parser/Tokenizer.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/HTML5/Parser/Tokenizer.php b/src/HTML5/Parser/Tokenizer.php index b84f9bf..899e908 100644 --- a/src/HTML5/Parser/Tokenizer.php +++ b/src/HTML5/Parser/Tokenizer.php @@ -539,6 +539,17 @@ class Tokenizer { return FALSE; } protected function doctype() { + if ($this->scanner->current() != 'D') { + return FALSE; + } + // Check that string is DOCTYPE + $chars = $this->scanner->charsWhile("DOCTYPE"); + if ($chars != 'DOCTYPE') { + $this->parseError('Expected DOCTYPE, got %s', $chars); + return $this->bogusComment('<!' . $chars); + } + + // Now we need to parse the DOCTYPE. } protected function beforeDoctype() { } |