mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-03 01:29:39 +02:00
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/1693
|
||||
// Forbid instances of:
|
||||
// - `url(`
|
||||
// - backslashes `\`
|
||||
// - opening comment `/*`
|
||||
compileStyleProperties(s) {
|
||||
if ( /url\(|\\/i.test(s) ) { return; }
|
||||
if ( /url\(|\\|\/\*/i.test(s) ) { return; }
|
||||
if ( this.div === null ) { return s; }
|
||||
this.div.style.cssText = s;
|
||||
if ( this.div.style.cssText === '' ) { return; }
|
||||
|
Loading…
Reference in New Issue
Block a user