mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-11 17:41:03 +01:00
Fix handling of end-anchor in redirect patterns
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/872 An end-anchor was treated as literal `|` in the redirect pattern to match instead of as a end-of-string condition.
This commit is contained in:
parent
e37447779b
commit
1d51927d2e
1 changed files with 1 additions and 0 deletions
|
@ -446,6 +446,7 @@ RedirectEngine.prototype.compileRuleFromStaticFilter = function(line) {
|
||||||
.replace(/\*/g, '[\\w.%-]*')
|
.replace(/\*/g, '[\\w.%-]*')
|
||||||
.replace(/\./g, '\\.') +
|
.replace(/\./g, '\\.') +
|
||||||
path
|
path
|
||||||
|
.replace(/\|$/, '$')
|
||||||
.replace(/[.+?{}()|[\]\/\\]/g, '\\$&')
|
.replace(/[.+?{}()|[\]\/\\]/g, '\\$&')
|
||||||
.replace(/\^/g, '[^\\w.%-]')
|
.replace(/\^/g, '[^\\w.%-]')
|
||||||
.replace(/\*/g, '.*?');
|
.replace(/\*/g, '.*?');
|
||||||
|
|
Loading…
Reference in a new issue