This commit is contained in:
Aevann1 2021-10-06 02:49:51 +02:00
parent 3be258d7c5
commit 5ecd88d686
3 changed files with 20 additions and 20 deletions

View file

@ -188,9 +188,9 @@ 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, '<span class="spoiler">').replace(end, '</span>')
for i in re.finditer("<p>\s*(:!?\w+:\s*)+<\/p>", sanitized):
for i in re.finditer(">\s*(:!?\w+:\s*)+<\/", sanitized):
old = i.group(0)
new = old.lower().replace("<p>", "<p style='margin-bottom:0 !important'>")
new = old.lower().replace(">", " style='margin-bottom:0 !important'>")
for i in re.finditer('\w*(?<!"):([^ ]{1,30}?):', new):
emoji = i.group(1).lower()
if emoji.startswith("!"):