mirror of https://github.com/gorhill/uBlock.git
Forbid instances of `/*` in `:style()` operator
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1693
This commit is contained in:
parent
5e6600a5cc
commit
a2d8545382
|
@ -1539,8 +1539,13 @@ Parser.prototype.SelectorCompiler = class {
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/668
|
// https://github.com/uBlockOrigin/uBlock-issues/issues/668
|
||||||
|
// https://github.com/uBlockOrigin/uBlock-issues/issues/1693
|
||||||
|
// Forbid instances of:
|
||||||
|
// - `url(`
|
||||||
|
// - backslashes `\`
|
||||||
|
// - opening comment `/*`
|
||||||
compileStyleProperties(s) {
|
compileStyleProperties(s) {
|
||||||
if ( /url\(|\\/i.test(s) ) { return; }
|
if ( /url\(|\\|\/\*/i.test(s) ) { return; }
|
||||||
if ( this.div === null ) { return s; }
|
if ( this.div === null ) { return s; }
|
||||||
this.div.style.cssText = s;
|
this.div.style.cssText = s;
|
||||||
if ( this.div.style.cssText === '' ) { return; }
|
if ( this.div.style.cssText === '' ) { return; }
|
||||||
|
|
Loading…
Reference in New Issue