diff --git a/files/helpers/sanitize.py b/files/helpers/sanitize.py index 743f4bb6b..79c2beb9f 100644 --- a/files/helpers/sanitize.py +++ b/files/helpers/sanitize.py @@ -212,7 +212,7 @@ 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): + for i in re.finditer("

\s*(:!?[\w]+:\s*)+<\/p>", sanitized): old = i.group(0) new = old.lower().replace("

", "

") for i in re.finditer('\w*(?