1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-11-05 18:32:30 +01:00

Drop as invalid unknown argument-based pseudoclass operators

Related issue:
- https://github.com/uBlockOrigin/uBlock-issues/issues/2442

These invalid pseudoclass operators were still seen as
valid when mixed with procedural pseudoclass operators.
This commit is contained in:
Raymond Hill 2023-01-06 09:54:11 -05:00
parent 7847731e9a
commit d9b50fcd51
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2

View File

@ -1750,9 +1750,12 @@ Parser.prototype.SelectorCompiler = class {
case 'IdSelector':
case 'PseudoClassSelector':
case 'PseudoElementSelector':
case 'TypeSelector':
prelude.push(this.astSerializePart(part));
case 'TypeSelector': {
const component = this.astSerializePart(part);
if ( component === undefined ) { return; }
prelude.push(component);
break;
}
case 'ProceduralSelector': {
if ( prelude.length !== 0 ) {
let spath = prelude.join('');