summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/HTML5/Parser/Tokenizer.php11
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() {
}