mirror of
https://github.com/gorhill/uBlock.git
synced 2026-03-11 09:04:36 +00:00
Fix matching of filters with trailing ^|
Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/h08132/can_we_enable_javascript_on_the_homepage_but/ftkxvc5/ The right bound of the match needs to be incremented when a trailing `^` matches a character.
This commit is contained in:
parent
bc7f149252
commit
d784fda98b
1 changed files with 6 additions and 2 deletions
|
|
@ -1020,8 +1020,12 @@ registerFilterClass(FilterAnchorRight);
|
|||
|
||||
const FilterTrailingSeparator = class {
|
||||
match() {
|
||||
return $patternMatchRight === $requestURL.length ||
|
||||
isSeparatorChar(bidiTrie.haystack[$patternMatchRight]);
|
||||
if ( $patternMatchRight === $requestURL.length ) { return true; }
|
||||
if ( isSeparatorChar(bidiTrie.haystack[$patternMatchRight]) ) {
|
||||
$patternMatchRight += 1;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
logData(details) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue