From 248d3c7d2588b1a959e4a36b238a4d96068f87b3 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sat, 16 Apr 2022 17:30:35 +0200 Subject: [PATCH] fdssfd --- files/helpers/sanitize.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 0e4ab52353..1aaa43c966 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -96,7 +96,8 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False): captured.append(i.group(0)) old = i.group(0) - new = old.lower() + if 'marseylong1' in old or 'marseylong2' in old or 'marseyllama1' in old or 'marseyllama2' in old: new = old.lower().replace(">", " class='mb-0'>") + else: new = old.lower() captured2 = [] for i in emoji_regex2.finditer(new): @@ -239,6 +240,9 @@ def sanitize(sanitized, noimages=False, alert=False, comment=False, edit=False): if name == 'src': return True return False + if tag == 'p': + if name == 'class' and value == 'mb-0': return True + return False sanitized = bleach.Cleaner(tags=allowed_tags,