remotes/1693045480750635534/spooky-22
Aevann1 2021-09-27 23:00:02 +02:00
parent 6f8a93c5bf
commit f7b1daa671
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)

View File

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