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)