From 14dbd1ff8b54a3b4e07d16bf04cabd3a4986c895 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 25 Jul 2021 22:14:08 +0200 Subject: [PATCH] fdfd --- drama/routes/admin.py | 1 + drama/routes/settings.py | 1 + 2 files changed, 2 insertions(+) diff --git a/drama/routes/admin.py b/drama/routes/admin.py index b04e1ab68..9ed218f81 100644 --- a/drama/routes/admin.py +++ b/drama/routes/admin.py @@ -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) diff --git a/drama/routes/settings.py b/drama/routes/settings.py index 2ba2c3092..fdcb610e5 100644 --- a/drama/routes/settings.py +++ b/drama/routes/settings.py @@ -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)