This commit is contained in:
Aevann1 2021-08-21 14:57:16 +02:00
parent 5964e8e29e
commit d9f5b7eeb3
7 changed files with 33 additions and 31 deletions

View file

@ -81,7 +81,7 @@ def settings_profile_post(v):
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|PNG|JPG|JPEG|GIF|9999))', bio, re.MULTILINE): bio = bio.replace(i.group(1), f'![]({i.group(1)})')
bio = bio.replace("\n", "\n\n").replace("\n\n\n\n\n\n", "\n\n").replace("\n\n\n\n", "\n\n").replace("\n\n\n", "\n\n")
with CustomRenderer() as renderer: bio_html = renderer.render(mistletoe.Document(bio))
bio_html = sanitize(bio_html, linkgen=True)
bio_html = sanitize(bio_html)
# Run safety filter
bans = filter_comment_html(bio_html)