Mark procedural filters with pseudo-elements selector as invalid

Related issue:
https://github.com/uBlockOrigin/uBlock-issues/issues/2786
This commit is contained in:
Raymond Hill 2024-01-16 09:25:22 -05:00
parent 101cef44d2
commit 757b8be9cd
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 3 additions and 4 deletions

View File

@ -3297,10 +3297,9 @@ class ExtSelectorCompiler {
if ( this.astHasType(parts, 'Error') ) { return; }
if ( this.astHasType(parts, 'Selector') === false ) { return; }
if ( this.astIsValidSelectorList(parts) === false ) { return; }
if (
this.astHasType(parts, 'ProceduralSelector') === false &&
this.astHasType(parts, 'ActionSelector') === false
) {
if ( this.astHasType(parts, 'ProceduralSelector') ) {
if ( this.astHasType(parts, 'PseudoElementSelector') ) { return; }
} else if ( this.astHasType(parts, 'ActionSelector') === false ) {
return this.astSerialize(parts);
}
const r = this.astCompile(parts);