mirror of https://github.com/gorhill/uBlock.git
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
|
@ -446,6 +446,7 @@ RedirectEngine.prototype.compileRuleFromStaticFilter = function(line) {
|
|||
.replace(/\*/g, '[\\w.%-]*')
|
||||
.replace(/\./g, '\\.') +
|
||||
path
|
||||
.replace(/\|$/, '$')
|
||||
.replace(/[.+?{}()|[\]\/\\]/g, '\\$&')
|
||||
.replace(/\^/g, '[^\\w.%-]')
|
||||
.replace(/\*/g, '.*?');
|
||||
|
|
Loading…
Reference in New Issue