From a967c9c0f7e8857385b8cb14aaa2e38bff66e43d Mon Sep 17 00:00:00 2001 From: iam-py-test <84232764+iam-py-test@users.noreply.github.com> Date: Tue, 9 May 2023 16:51:59 -0400 Subject: [PATCH] Hopefully fix it --- ClearURLs for uBo/compile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ClearURLs for uBo/compile.py b/ClearURLs for uBo/compile.py index a06688ab0..bbc013401 100644 --- a/ClearURLs for uBo/compile.py +++ b/ClearURLs for uBo/compile.py @@ -41,7 +41,7 @@ HEAD = """\ ! Note: This was based off of https://gist.github.com/rusty-snake/5cd83a87d680ecbd03e79a1a06758207, which is based off of https://github.com/ClearURLs/Rules. The maintainers of Adfilt (DandelionSprout and iam-py-test, and contributors) have made some modifications as to keep it up-to-date with the source and to fix issues. ! IMPORTANT NOTE: Do not modify this file in pull requests. This file is auto-generated and therefore any direct edit to it will be undone. Instead, modifications must be made to https://github.com/DandelionSprout/adfilt/blob/master/ClearURLs%20for%20uBo/compile.py or to the upstream ClearURLs rules. If you experience an issue, please report it to https://github.com/DandelionSprout/adfilt/discussions/163, and we (the Adfilt maintainers and community) will look into it and either add an exclusion or report it to the ClearURLs team. ! Important note about the purpose of this list: this list can not bypass tracker redirects through third-party domains. This can be done by strict-blocking said domain and using the ability to view params on the strict-block page to bypass it. -! The adfilt maintainers would like to thank https://github.com/rusty-snake for helping create this list. +! The adfilt maintainers would like to thank https://github.com/rusty-snake for helping create this Python script """ KNOWN_BAD_FILTERS = [ @@ -140,7 +140,6 @@ def normalize_url_pattern(url_pattern: str) -> str: def normalize_exception(exception: str) -> tuple[str, str]: orig_exception = exception - exception = exception.replace(r"^https?:\\/\\/(?:[a-z0-9-]+\\.)*?\\.", "||", 1) exception = exception.replace(r"^https?:\/\/(?:[a-z0-9-]+\.)*?", "||", 1) exception = exception.replace(r"^https?:\/\/", "||", 1) # FIXME: |ws:// @@ -158,6 +157,8 @@ def normalize_exception(exception: str) -> tuple[str, str]: exception = exception.replace("\\", "") + exception = exception.replace("||.","||") + if any(c in "([" for c in exception): exception = orig_exception exception = exception.replace("(?:", "(")