From 8310e91e0e3f35dfc151e24f0795dd6a189b3bb5 Mon Sep 17 00:00:00 2001 From: Raymond Hill Date: Mon, 25 May 2020 07:02:49 -0400 Subject: [PATCH] Fix mixing hostname and entity in `domain=` option Reported internally. Related commit: - https://github.com/gorhill/uBlock/commit/3c67d2b89f8ac6d680e74af3e11b916889f7feed --- src/js/static-net-filtering.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js/static-net-filtering.js b/src/js/static-net-filtering.js index 030bbc5f0..c3146bda5 100644 --- a/src/js/static-net-filtering.js +++ b/src/js/static-net-filtering.js @@ -1188,7 +1188,7 @@ const filterOrigin = (( ) => { compiledHit.push(FilterOriginHitSet.compile(hostnameHits.join('|'))); } if ( compiledHit.length > 1 ) { - compiledHit[0] = [ FilterCompositeAny.compile(compiledHit.slice()) ]; + compiledHit[0] = FilterCompositeAny.compile(compiledHit.slice()); compiledHit.length = 1; } const compiledMiss = []; @@ -1804,7 +1804,7 @@ const FilterDenyAllow = class { static fromCompiled(args) { const f = new FilterDenyAllow(args[1]); - for ( const hn of args[1].split('|') ) { + for ( const hn of FilterParser.domainOptIterator(args[1]) ) { if ( hn === '' ) { continue; } f.hndict.add(hn); }