This commit is contained in:
Aevann1 2021-09-27 23:00:02 +02:00
parent c4201a61cc
commit 0bb4afd4f0
2 changed files with 0 additions and 2 deletions

View file

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