From 9b91408eaba4708cec20c3449a1eece103fcf7bc Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 26 Aug 2021 14:54:44 +0200 Subject: [PATCH] fdfd --- files/helpers/sanitize.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 6be3262ec..9f434df4c 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -164,11 +164,11 @@ def sanitize(sanitized): end = '</s>' 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('

:(.{1,30}?):

', sanitized): + for i in re.finditer('

:([^ ]{1,30}?):

', sanitized): if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.gif'): sanitized = sanitized.replace(f'

:{i.group(1)}:

', f'

') - for i in re.finditer(':(.{1,30}?):', sanitized): + for i in re.finditer(':([^ ]{1,30}?):', sanitized): if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.gif'): sanitized = sanitized.replace(f':{i.group(1)}:', f'')