mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-07 03:12:33 +01:00
Fix unescaped backslashes in selector attribute
Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/yjoh9p/
This commit is contained in:
parent
28b0d04c89
commit
42ddac5e3d
@ -1589,7 +1589,7 @@ Parser.prototype.SelectorCompiler = class {
|
|||||||
if ( typeof value !== 'string' ) {
|
if ( typeof value !== 'string' ) {
|
||||||
value = data.value.name;
|
value = data.value.name;
|
||||||
}
|
}
|
||||||
value = value.replace(/"/g, '\\$&');
|
value = value.replace(/["\\]/g, '\\$&');
|
||||||
let flags = '';
|
let flags = '';
|
||||||
if ( typeof data.flags === 'string' ) {
|
if ( typeof data.flags === 'string' ) {
|
||||||
if ( /^(is?|si?)$/.test(data.flags) === false ) { return; }
|
if ( /^(is?|si?)$/.test(data.flags) === false ) { return; }
|
||||||
|
Loading…
Reference in New Issue
Block a user