Skip to content

Commit

Permalink
Drop as invalid unknown argument-based pseudoclass operators
Browse files Browse the repository at this point in the history
Related issue:
- uBlockOrigin/uBlock-issues#2442

These invalid pseudoclass operators were still seen as
valid when mixed with procedural pseudoclass operators.
  • Loading branch information
gorhill committed Jan 6, 2023
1 parent 7847731 commit d9b50fc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/js/static-filtering-parser.js
Expand Up @@ -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('');
Expand Down

0 comments on commit d9b50fc

Please sign in to comment.