master
Aevann1 2021-07-25 22:14:08 +02:00
parent 4c6c1ecb6d
commit 14dbd1ff8b
2 changed files with 2 additions and 0 deletions

View File

@ -742,6 +742,7 @@ def ban_post(post_id, v):
post.is_pinned = False
ban_reason=request.form.get("reason", "")
ban_reason = ban_reason.replace("\n", "\n\n")
with CustomRenderer() as renderer:
ban_reason = renderer.render(mistletoe.Document(ban_reason))
ban_reason = sanitize(ban_reason, linkgen=True)

View File

@ -85,6 +85,7 @@ def settings_profile_post(v):
error="You didn't change anything")
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif))', bio, re.MULTILINE): bio = bio.replace(i.group(1), f'![]({i.group(1)})')
bio = bio.replace("\n", "\n\n")
with CustomRenderer() as renderer:
bio_html = renderer.render(mistletoe.Document(bio))
bio_html = sanitize(bio_html, linkgen=True)