From 57df1ac8b50c28a230750f785b06d0e045697431 Mon Sep 17 00:00:00 2001
From: Aevann1
Date: Thu, 30 Sep 2021 23:24:20 +0200
Subject: [PATCH] fggf
---
files/helpers/sanitize.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py
index 5257df9c42..ed1036dcfd 100644
--- a/files/helpers/sanitize.py
+++ b/files/helpers/sanitize.py
@@ -218,14 +218,12 @@ def sanitize(sanitized, noimages=False):
if start in sanitized and end in sanitized and start in sanitized.split(end)[0] and end in sanitized.split(start)[1]: sanitized = sanitized.replace(start, '').replace(end, '')
for i in re.finditer("^(\s+)?((:[\w]+:)+(\s+)?)+", sanitized.replace("", "").replace("
", ""), re.MULTILINE):
- print(i)
emojis = i.group(0).lower()
- print(emojis)
for i in re.finditer('\w*(?:{emoji}:
', f'![:{emoji}: :{emoji}:](https://{site}/assets/images/emojis/{emoji}.webp)
')
+ sanitized = sanitized.replace(f':{emoji}:', f'![:{emoji}: :{emoji}:](https://{site}/assets/images/emojis/{emoji}.webp)
')
try:
if emoji in session["favorite_emojis"]: session["favorite_emojis"][emoji] += 1