forked from MarseyWorld/MarseyWorld
dfsfs
parent
5875924f9b
commit
aea6981946
|
@ -214,7 +214,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, '<span class="spoiler">').replace(end, '</span>')
|
||||
|
||||
for i in re.finditer("<p>\s*((:\w+:)\s*)+<\/p>", sanitized):
|
||||
emojis = i.group(0).lower().replace("<p>", "").replace("</p>", "")
|
||||
emojis = i.group(0).lower()
|
||||
for i in re.finditer('\w*(?<!"):([^ ]{1,30}?):', emojis):
|
||||
emoji = i.group(1).lower()
|
||||
if path.isfile(f'./files/assets/images/emojis/{emoji}.webp'):
|
||||
|
@ -223,8 +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(i.group(0))
|
||||
sanitized = sanitized.replace(i.group(0), emojis)
|
||||
sanitized = sanitized.replace(i.group(0), emojis).replace("<p>", "").replace("</p>", "")
|
||||
|
||||
for i in re.finditer('\w*(?<!"):([^ ]{1,30}?):', sanitized):
|
||||
emoji = i.group(1).lower()
|
||||
|
|
Loading…
Reference in New Issue