From b3e9af24acd2eacd031e42830620abd725d74408 Mon Sep 17 00:00:00 2001 From: ninya9k Date: Sun, 18 Jul 2021 04:21:23 +0000 Subject: [PATCH] case insensitive word filters --- website/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/chat.py b/website/chat.py index 5069100..697c145 100644 --- a/website/chat.py +++ b/website/chat.py @@ -142,7 +142,7 @@ def _comment(text, token, c_response, c_ciphertext, nonce): word = escape(word) # escape for html word = re.escape(word) # escape for regex regex = r'\b{}\b'.format(word) - markup, n = re.subn(regex, '[CENSORED]', markup) + markup, n = re.subn(regex, '[CENSORED]', markup, flags=re.IGNORECASE) if n: reaction = key # enact consequences of word filters note = N_NONE