mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-15 15:32:28 +02: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
@ -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 New Issue
Block a user