diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index ffa01588cc..fe95ee2b86 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -217,11 +217,10 @@ 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, '') - li = list(re.finditer('
:([^ ]{1,30}?):
', sanitized)) - for i in li: + for i in re.finditer(':([^ ]{1,30}?):
', sanitized): emoji = i.group(1).lower() if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'): - sanitized = re.sub(f':{emoji}:
', f':{emoji}:
', f'