From: funilrys Date: Tue, 13 Jul 2021 18:11:28 +0000 (+0200) Subject: Fix whitelisting issue when RAW list are given. X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=6299aebe61644042fec79db4e36da6a3d6b8edaf;p=stevenblack-hosts.git 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. --- 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