remotes/1693045480750635534/spooky-22
Aevann1 2021-10-01 02:07:13 +02:00
parent c43e0bb840
commit 136b2a52eb
1 changed files with 4 additions and 0 deletions

View File

@ -218,9 +218,13 @@ def sanitize(sanitized, noimages=False):
for i in re.finditer('\w*(?<!"):([^ ]{1,30}?):', emojis):
emoji = i.group(1).lower()
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
print(emojis)
emojis = re.sub(f'\w*(?<!"):{emoji}:', f'<img loading="lazy" data-bs-toggle="tooltip" alt=":{emoji}:" title=":{emoji}:" delay="0" height=60 src="https://{site}/assets/images/emojis/{emoji}.webp">', emojis)
print(emojis)
break
if emoji in session["favorite_emojis"]: session["favorite_emojis"][emoji] += 1
else: session["favorite_emojis"][emoji] = 1
break
emojis = emojis.replace("<p>", "<p style='margin-bottom:0 !important'>")
print(sanitized)
print('\n')