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