master
Aevann1 2021-10-05 22:48:15 +02:00
parent 5483d2b5d3
commit cfc6b8a3d4
1 changed files with 2 additions and 2 deletions

View File

@ -190,7 +190,7 @@ def sanitize(sanitized, noimages=False):
for i in re.finditer("<p>\s*(((:\w+:)|(!\w+!))\s*)+<\/p>", sanitized):
old = i.group(0)
new = old.lower().replace("<p>", "<p style='margin-bottom:0'>")
new = old.lower()
for i in re.finditer('\w*(?<!"):([^ ]{1,30}?):', new):
emoji = i.group(1).lower()
print(emoji)
@ -209,7 +209,7 @@ def sanitize(sanitized, noimages=False):
if emoji in session["favorite_emojis"]: session["favorite_emojis"][emoji] += 1
else: session["favorite_emojis"][emoji] = 1
sanitized = sanitized.replace(old, new)
sanitized = sanitized.replace(old, new.replace("<p>", "<p style='margin-bottom:0'>"))
for i in re.finditer('\w*(?<!"):([^ ]{1,30}?):', sanitized):