diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 4f687bceec..c872675a3d 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -214,8 +214,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("
\s*((:\w+:)\s*)+<\/p>", sanitized): - emojis = i.group(0).lower() - print(emojis) + old = i.group(0) + emojis = i.group(0).lower().replace("
", "
") for i in re.finditer('\w*(?" + i.group(0) + "
" - new = "" + emojis + "
" - sanitized = sanitized.replace(old, new) + sanitized = sanitized.replace(old, emojis) # for i in re.finditer('\w*(?