From 4c65fadfb8597d91c5168c3fe0de21c5a7d767b3 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 23 Sep 2021 00:15:01 +0200 Subject: [PATCH] dfs --- files/routes/comments.py | 1 - 1 file changed, 1 deletion(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index aa37a28202..3f2dacc85c 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -610,7 +610,6 @@ def edit_comment(cid, v): body = request.values.get("body", "")[:10000] for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|webp|PNG|JPG|JPEG|GIF|WEBP|9999))', body, re.MULTILINE): if "wikipedia" not in i.group(1): body = body.replace(i.group(1), f'![]({i.group(1)})') - body = body.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") body_md = CustomRenderer().render(mistletoe.Document(body)) body_html = sanitize(body_md)