mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
Harden detection of //
in style declaration
Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/issues/1811#issuecomment-966323765
This commit is contained in:
parent
cf34200421
commit
9fbc50f14f
@ -1564,6 +1564,7 @@ Parser.prototype.SelectorCompiler = class {
|
||||
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/668
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/1693
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/1811
|
||||
// Forbid instances of:
|
||||
// - `image-set(`
|
||||
// - `url(`
|
||||
@ -1571,7 +1572,7 @@ Parser.prototype.SelectorCompiler = class {
|
||||
// - backslashes `\`
|
||||
// - opening comment `/*`
|
||||
compileStyleProperties(s) {
|
||||
if ( /image-set\(|url\(|\/\/|\\|\/\*/i.test(s) ) { return; }
|
||||
if ( /image-set\(|url\(|\/\s*\/|\\|\/\*/i.test(s) ) { return; }
|
||||
if ( this.stylesheet === null ) { return s; }
|
||||
let valid = false;
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user