mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-18 08:52:26 +02:00
Fix incorrect serialization of pseudo elements
Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/ylnvwf/how_to_block_suggestive_keyword_in_reddit_search/iv014wu/
This commit is contained in:
parent
d7cca916a6
commit
c3d0d574d7
@ -1636,7 +1636,8 @@ Parser.prototype.SelectorCompiler = class {
|
|||||||
}
|
}
|
||||||
case 'PseudoClassSelector':
|
case 'PseudoClassSelector':
|
||||||
case 'PseudoElementSelector':
|
case 'PseudoElementSelector':
|
||||||
out.push(`:${data.name}`);
|
out.push(data.type === 'PseudoClassSelector' ? ':' : '::');
|
||||||
|
out.push(data.name);
|
||||||
if ( Array.isArray(part.args) ) {
|
if ( Array.isArray(part.args) ) {
|
||||||
const arg = this.astSerialize(part.args);
|
const arg = this.astSerialize(part.args);
|
||||||
if ( typeof arg !== 'string' ) { return; }
|
if ( typeof arg !== 'string' ) { return; }
|
||||||
@ -1656,7 +1657,6 @@ Parser.prototype.SelectorCompiler = class {
|
|||||||
return out.join('');
|
return out.join('');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
astSerialize(parts, plainCSS = true) {
|
astSerialize(parts, plainCSS = true) {
|
||||||
const out = [];
|
const out = [];
|
||||||
for ( const part of parts ) {
|
for ( const part of parts ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user