diff options
author | Matt Butcher <[email protected]> | 2013-05-01 11:23:13 -0500 |
---|---|---|
committer | Matt Butcher <[email protected]> | 2013-05-01 11:23:13 -0500 |
commit | 9d8b0733bba28d5e057d896bde34d70b25403143 (patch) | |
tree | b5c7a4665f04aa68b27450270d0816c468a263bb /src/HTML5 | |
parent | 27ba1335239833cba2bfcaeebc0c3195a535a004 (diff) |
Fixed faulty test.
The parser is actually really strict, and maybe we should back off on
enforcing some of the stricter rules.
Diffstat (limited to 'src/HTML5')
-rw-r--r-- | src/HTML5/Parser/DOMTreeBuilder.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/HTML5/Parser/DOMTreeBuilder.php b/src/HTML5/Parser/DOMTreeBuilder.php index d1fe1eb..4e2669c 100644 --- a/src/HTML5/Parser/DOMTreeBuilder.php +++ b/src/HTML5/Parser/DOMTreeBuilder.php @@ -238,13 +238,16 @@ class DOMTreeBuilder implements EventHandler { } public function text($data) { + // XXX: Hmmm.... should we really be this strict? if ($this->insertMode < self::IM_IN_HEAD) { $data = trim($data); if (!empty($data)) { + //fprintf(STDOUT, "Unexpected insert mode: %d", $this->insertMode); $this->parseError("Unexpected text. Ignoring: " . $data); return; } } + //fprintf(STDOUT, "Appending text %s.", $data); $node = $this->doc->createTextNode($data); $this->current->appendChild($node); } |