mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
Fix overzealous validation of :style() arguments
This commit is contained in:
parent
f638da41d6
commit
c698a9fcec
@ -1476,7 +1476,10 @@ Parser.prototype.SelectorCompiler = class {
|
|||||||
astFromRaw(raw, type) {
|
astFromRaw(raw, type) {
|
||||||
let ast;
|
let ast;
|
||||||
try {
|
try {
|
||||||
ast = cssTree.parse(raw, { context: type });
|
ast = cssTree.parse(raw, {
|
||||||
|
context: type,
|
||||||
|
parseValue: false,
|
||||||
|
});
|
||||||
} catch(reason) {
|
} catch(reason) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1932,7 +1935,6 @@ Parser.prototype.SelectorCompiler = class {
|
|||||||
if ( /image-set\(|url\(|\/\s*\/|\\|\/\*/i.test(s) ) { return; }
|
if ( /image-set\(|url\(|\/\s*\/|\\|\/\*/i.test(s) ) { return; }
|
||||||
const parts = this.astFromRaw(s, 'declarationList');
|
const parts = this.astFromRaw(s, 'declarationList');
|
||||||
if ( parts === undefined ) { return; }
|
if ( parts === undefined ) { return; }
|
||||||
if ( this.astHasType(parts, 'Raw') ) { return; }
|
|
||||||
if ( this.astHasType(parts, 'Declaration') === false ) { return; }
|
if ( this.astHasType(parts, 'Declaration') === false ) { return; }
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user