summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Butcher <[email protected]>2013-09-15 13:28:23 -0600
committerMatt Butcher <[email protected]>2013-09-15 13:28:23 -0600
commit47378a3d74a708d46538ebf0ed670e808dd7b165 (patch)
tree786a0813b4b0430489ec8d20ad82de1d79cd395b
parent68d3721e47ced10bdc06adf0da7687e4e166f17f (diff)
Fixed the logic for search for a close-instruction (#16).
Again, thanks to @MrElectronic.
-rw-r--r--src/HTML5/Parser/Tokenizer.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/HTML5/Parser/Tokenizer.php b/src/HTML5/Parser/Tokenizer.php
index fe248aa..d30f9d8 100644
--- a/src/HTML5/Parser/Tokenizer.php
+++ b/src/HTML5/Parser/Tokenizer.php
@@ -794,7 +794,8 @@ class Tokenizer {
}
$data = '';
- while ($this->scanner->current() != '?' && $this->scanner->peek() != '>') {
+ // As long as it's not the case that the next two chars are ? and >.
+ while (!($this->scanner->current() == '?' && $this->scanner->peek() == '>')) {
$data .= $this->scanner->current();
$tok = $this->scanner->next();