From 9ac18318af6e755d875a5df10b8e9001cfd4a0cd Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 7 Aug 2023 13:58:15 -0400 Subject: [PATCH] Fix parsing cosmetic filter anchor when using AdGuard/ABP modifiers Related issue: https://github.com/uBlockOrigin/uBlock-issues/issues/2765 --- src/js/epicker-ui.js | 2 +- src/js/scriptlets/epicker.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/epicker-ui.js b/src/js/epicker-ui.js index 60ab3fb75..4dfe7ec47 100644 --- a/src/js/epicker-ui.js +++ b/src/js/epicker-ui.js @@ -50,7 +50,7 @@ const svgOcean = svgRoot.children[0]; const svgIslands = svgRoot.children[1]; const NoPaths = 'M0 0'; -const reCosmeticAnchor = /^#[$?]?#/; +const reCosmeticAnchor = /^#(\$|\?|\$\?)?#/; const epickerId = (( ) => { const url = new URL(self.location.href); diff --git a/src/js/scriptlets/epicker.js b/src/js/scriptlets/epicker.js index a1db985f2..402ac7599 100644 --- a/src/js/scriptlets/epicker.js +++ b/src/js/scriptlets/epicker.js @@ -44,7 +44,7 @@ if ( pickerRoot !== null ) { return; } let pickerBootArgs; -const reCosmeticAnchor = /^#[$?]?#/; +const reCosmeticAnchor = /^#(\$|\?|\$\?)?#/; const netFilterCandidates = []; const cosmeticFilterCandidates = [];