From 61e7bf32dfaca0fe1268bcfe36412d7a2dcc1824 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 5 Mar 2022 05:22:38 +0200 Subject: [PATCH] yikes sweety --- files/helpers/const.py | 1 + files/helpers/sanitize.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/files/helpers/const.py b/files/helpers/const.py index 15b9a196e..f1403be53 100644 --- a/files/helpers/const.py +++ b/files/helpers/const.py @@ -103,6 +103,7 @@ SLURS = { "elon musk": "rocket daddy", " elon ": " rocket daddy ", "fake and gay": "fake and straight", + ':n: :i::g::g::e::r:':':b: :i::p::o::c:' } single_words = "|".join([slur.lower() for slur in SLURS.keys()]) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 51f7f6049..c20416a2a 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -236,7 +236,7 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False): if remoji == 'marseyrandom': remoji = choice(marseys_const) if path.isfile(f'files/assets/images/emojis/{remoji}.webp'): - new = re.sub(f'(?', new, flags=re.I|re.A) + new = re.sub(f'(?', new, flags=re.I|re.A) if comment: marseys_used.add(emoji) sanitized = sanitized.replace(old, new) @@ -326,7 +326,7 @@ def filter_emojis_only(title, edit=False, graceful=False): signal.signal(signal.SIGALRM, handler2) signal.alarm(1) - title = title.replace("","").replace('<','<').replace('>','>').replace("&", "&").replace('"', '"').replace("'", "'").replace("\ufeff", "").replace("𒐪","").replace('‎','').replace("\n", "").replace("\r", "").replace("\t", "").strip() + title = title.replace("","").replace("&", "&").replace('<','<').replace('>','>').replace('"', '"').replace("'", "'").replace("\ufeff", "").replace("𒐪","").replace('‎','').replace("\n", "").replace("\r", "").replace("\t", "").strip() title = bleach.clean(title, tags=[])