summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAsmir Mustafic <[email protected]>2020-09-01 11:06:08 +0200
committerGitHub <[email protected]>2020-09-01 11:06:08 +0200
commitdafd1c0908d74bb7e6b39381c9e4017b3ab9fb71 (patch)
tree5147fa13330f28ab85258b342790ff55026eff2d /src
parent6b47f1f12f3534ce62cf9c8322d4d3ccd4d02533 (diff)
parent475f5f59e3e37011413e2167fe00cccc78aab582 (diff)
Merge pull request #194 from bytestream/anchor-target-query-param
fix: query parameter parsed as character entity
Diffstat (limited to 'src')
-rw-r--r--src/HTML5/Parser/Tokenizer.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/HTML5/Parser/Tokenizer.php b/src/HTML5/Parser/Tokenizer.php
index 0fd1ee7..300a446 100644
--- a/src/HTML5/Parser/Tokenizer.php
+++ b/src/HTML5/Parser/Tokenizer.php
@@ -1181,16 +1181,11 @@ class Tokenizer
return $entity;
}
- // If in an attribute, then failing to match ; means unconsume the
- // entire string. Otherwise, failure to match is an error.
- if ($inAttribute) {
- $this->scanner->unconsume($this->scanner->position() - $start);
-
- return '&';
- }
+ // Failing to match ; means unconsume the entire string.
+ $this->scanner->unconsume($this->scanner->position() - $start);
$this->parseError('Expected &ENTITY;, got &ENTITY%s (no trailing ;) ', $tok);
- return '&' . $entity;
+ return '&';
}
}