forked from rDrama/rDrama
fdfd
parent
4c6c1ecb6d
commit
14dbd1ff8b
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue