forked from rDrama/rDrama
fdfd
parent
e4513683f4
commit
7b132d36d8
|
@ -178,9 +178,9 @@ def sanitize(text, linkgen=False, flair=False):
|
||||||
end = '</s>'
|
end = '</s>'
|
||||||
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>')
|
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>:(.{1,30}?):</p>', sanitized):
|
# for i in re.finditer('<p>:(.{1,30}?):</p>', sanitized):
|
||||||
if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.gif'):
|
# if path.isfile(f'./files/assets/images/emojis/{i.group(1)}.gif'):
|
||||||
sanitized = sanitized.replace(f':{i.group(1)}:', f'<img data-toggle="tooltip" title="{i.group(1)}" delay="0" height=60 src="https://{site}/assets/images/emojis/{i.group(1)}.gif"<span>')
|
# sanitized = sanitized.replace(f':{i.group(1)}:', f'<img data-toggle="tooltip" title="{i.group(1)}" delay="0" height=60 src="https://{site}/assets/images/emojis/{i.group(1)}.gif"<span>')
|
||||||
|
|
||||||
if flair: emojisize = 20
|
if flair: emojisize = 20
|
||||||
else: emojisize = 30
|
else: emojisize = 30
|
||||||
|
|
Loading…
Reference in New Issue