From 3dddf4ca47bac1b165794575d4e6eb1f24d3deea Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Wed, 19 Apr 2023 07:40:12 -0400 Subject: [PATCH] Fix compiling of negated regex-based `to=` domain Related feedback: - https://github.com/uBlockOrigin/uBlock-issues/discussions/2234#discussioncomment-5655665 --- src/js/static-net-filtering.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index 1c1e60e1d..6dd29c969 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -1500,7 +1500,7 @@ const compileDomainOpt = (ctors, iterable, prepend, units) => { if ( len <= beg ) { continue; } if ( s.charCodeAt(beg) === 0x2F /* / */ ) { if ( beg === 0 ) { regexHits.push(s); continue; } - regexMisses.push(s); continue; + regexMisses.push(s.slice(1)); continue; } if ( s.endsWith('.*') === false ) { if ( beg === 0 ) { hostnameHits.push(s); continue; }