mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-05 18:32:30 +01:00
Forbid usage of inage-set
as style property
Related issue: - https://github.com/uBlockOrigin/uBlock-issues/issues/1811 Additionally, forbid style declaration with at least one instance of `//` at any position.
This commit is contained in:
parent
36faf27c69
commit
5d22b51668
@ -1565,11 +1565,13 @@ Parser.prototype.SelectorCompiler = class {
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/668
|
||||
// https://github.com/uBlockOrigin/uBlock-issues/issues/1693
|
||||
// Forbid instances of:
|
||||
// - `image-set(`
|
||||
// - `url(`
|
||||
// - any instance of `//`
|
||||
// - backslashes `\`
|
||||
// - opening comment `/*`
|
||||
compileStyleProperties(s) {
|
||||
if ( /url\(|\\|\/\*/i.test(s) ) { return; }
|
||||
if ( /image-set\(|url\(|\/\/|\\|\/\*/i.test(s) ) { return; }
|
||||
if ( this.stylesheet === null ) { return s; }
|
||||
let valid = false;
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user