mirror of https://github.com/gorhill/uBlock.git
Disallow `-abp-...` filters if not using `#?#`
Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/issues/2435#issuecomment-1367805459
This commit is contained in:
parent
3c9ad16359
commit
72dabcac66
|
@ -1536,7 +1536,6 @@ Parser.prototype.SelectorCompiler = class {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if ( head ) {
|
||||
if ( args ) {
|
||||
this.astFlatten(head.data, args);
|
||||
|
@ -1548,7 +1547,9 @@ Parser.prototype.SelectorCompiler = class {
|
|||
}
|
||||
}
|
||||
if ( data.type !== 'PseudoClassSelector' ) { return; }
|
||||
|
||||
if ( data.name.startsWith('-abp-') && this.asProcedural === false ) {
|
||||
return;
|
||||
}
|
||||
// Post-analysis, mind:
|
||||
// - https://w3c.github.io/csswg-drafts/selectors-4/#has-pseudo
|
||||
// - https://w3c.github.io/csswg-drafts/selectors-4/#negation
|
||||
|
|
Loading…
Reference in New Issue