From 6299aebe61644042fec79db4e36da6a3d6b8edaf Mon Sep 17 00:00:00 2001 From: funilrys Date: Tue, 13 Jul 2021 20:11:28 +0200 Subject: [PATCH] Fix whitelisting issue when RAW list are given. This patch fixes #1687. Indeed, before this patch, the whitelisting of a RAW/Plain list of domain was overlooked. --- updateHostsFile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/updateHostsFile.py b/updateHostsFile.py index 1bb937c1b..4dc5a885b 100644 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -955,7 +955,7 @@ def remove_dups_and_excl(merge_file, exclusion_regexes, output_file=None): ) for exclude in exclusions: - if re.search(r"[\s\.]" + re.escape(exclude) + r"\s", line): + if re.search(r"(^|[\s\.])" + re.escape(exclude) + r"\s", line): write_line = False break