From a0bd77674eabd03ac76260eb440217426b7e28ca Mon Sep 17 00:00:00 2001 From: Leon Sandøy Date: Mon, 30 Jul 2018 14:40:48 +0200 Subject: Case insensitive URL filtering --- bot/cogs/filtering.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/cogs/filtering.py b/bot/cogs/filtering.py index d9cb2bb82..c6da923ae 100644 --- a/bot/cogs/filtering.py +++ b/bot/cogs/filtering.py @@ -168,11 +168,11 @@ class Filtering: the blacklisted URLs from the config file. """ - if not re.search(URL_RE, text): + if not re.search(URL_RE.lower(), text.lower()): return False for url in Filter.domain_blacklist: - if url in text: + if url.lower() in text.lower(): return True return False -- cgit v1.2.3