From f7b1daa671f13929cbec26781335519e33cfe5c8 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Mon, 27 Sep 2021 23:00:02 +0200 Subject: [PATCH] fds --- files/routes/comments.py | 1 - files/routes/posts.py | 1 - 2 files changed, 2 deletions(-) diff --git a/files/routes/comments.py b/files/routes/comments.py index 5c443ea8dc..367ade160c 100644 --- a/files/routes/comments.py +++ b/files/routes/comments.py @@ -597,7 +597,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 = re.sub('([^\n])\n([^\n])', r'\1\n\n\2', body) body_md = CustomRenderer().render(mistletoe.Document(body)) body_html = sanitize(body_md) diff --git a/files/routes/posts.py b/files/routes/posts.py index 6630d7d5ca..549bc8da2c 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -229,7 +229,6 @@ def edit_post(pid, v): if body != p.body: 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 = re.sub('([^\n])\n([^\n])', r'\1\n\n\2', body) body_md = CustomRenderer().render(mistletoe.Document(body)) body_html = sanitize(body_md)