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,
|
||||
redirect = '',
|
||||
srchns = [];
|
||||
for ( const option of matches[3].split(',') ) {
|
||||
for ( const option of matches[3].trim().split(/,/) ) {
|
||||
if ( option.startsWith('redirect=') ) {
|
||||
redirect = option.slice(9);
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue