From 42ddac5e3dafd296873267e0ccd544f483d671e7 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 2 Nov 2022 08:32:54 -0400 Subject: [PATCH] Fix unescaped backslashes in selector attribute Related feedback: - https://www.reddit.com/r/uBlockOrigin/comments/yjoh9p/ --- src/js/static-filtering-parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/static-filtering-parser.js b/src/js/static-filtering-parser.js index 7776103ef..3bd8316bd 100644 --- a/src/js/static-filtering-parser.js +++ b/src/js/static-filtering-parser.js @@ -1589,7 +1589,7 @@ Parser.prototype.SelectorCompiler = class { if ( typeof value !== 'string' ) { value = data.value.name; } - value = value.replace(/"/g, '\\$&'); + value = value.replace(/["\\]/g, '\\$&'); let flags = ''; if ( typeof data.flags === 'string' ) { if ( /^(is?|si?)$/.test(data.flags) === false ) { return; }