master
Aevann1 2021-09-23 00:15:01 +02:00
parent 42dc26d4ed
commit 4c65fadfb8
1 changed files with 0 additions and 1 deletions

View File

@ -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)