forked from MarseyWorld/MarseyWorld
dfssfd
parent
05f4899593
commit
0864eed0a6
|
@ -215,6 +215,7 @@ def sanitize(sanitized, noimages=False):
|
|||
|
||||
for i in re.finditer("<p>\s*((:\w+:)\s*)+<\/p>", sanitized):
|
||||
emojis = i.group(0).lower()
|
||||
print(emojis)
|
||||
for i in re.finditer('\w*(?<!"):([^ ]{1,30}?):', emojis):
|
||||
emoji = i.group(1).lower()
|
||||
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
|
||||
|
@ -222,7 +223,7 @@ def sanitize(sanitized, noimages=False):
|
|||
|
||||
if emoji in session["favorite_emojis"]: session["favorite_emojis"][emoji] += 1
|
||||
else: session["favorite_emojis"][emoji] = 1
|
||||
print(emojis)
|
||||
|
||||
old = "<p>" + i.group(0) + "</p>"
|
||||
new = "<p style='margin-bottom:0 !important'>" + emojis + "</p>"
|
||||
sanitized = sanitized.replace(old, new)
|
||||
|
|
Loading…
Reference in New Issue