mirror of https://github.com/gorhill/uBlock.git
Fix spurious rejection of some AdGuard redirect filters
Lines in AdGuard filter lists have trailing `\r` characters, and these caused the redirect engine compile code to reject as invalid the redirect token. This is trivially fixed by trimming the raw option strings before parsing it in the redirect engine.
This commit is contained in:
parent
ba0d4f8a38
commit
d49a9dce66
|
@ -460,7 +460,7 @@ RedirectEngine.prototype.compileRuleFromStaticFilter = function(line) {
|
||||||
let type,
|
let type,
|
||||||
redirect = '',
|
redirect = '',
|
||||||
srchns = [];
|
srchns = [];
|
||||||
for ( const option of matches[3].split(',') ) {
|
for ( const option of matches[3].trim().split(/,/) ) {
|
||||||
if ( option.startsWith('redirect=') ) {
|
if ( option.startsWith('redirect=') ) {
|
||||||
redirect = option.slice(9);
|
redirect = option.slice(9);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue