fdfd
This commit is contained in:
parent
18e372920d
commit
2af3638618
6 changed files with 26 additions and 7 deletions
|
@ -276,6 +276,7 @@ def edit_post(pid, v):
|
|||
|
||||
body = request.form.get("body", "")
|
||||
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif))', body, re.MULTILINE): body = body.replace(i.group(1), f'})')
|
||||
body = body.replace("\n", "\n\n")
|
||||
with CustomRenderer() as renderer:
|
||||
body_md = renderer.render(mistletoe.Document(body))
|
||||
body_html = sanitize(body_md, linkgen=True)
|
||||
|
@ -894,6 +895,7 @@ def submit_post(v):
|
|||
|
||||
# render text
|
||||
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif))', body, re.MULTILINE): body = body.replace(i.group(1), f'})')
|
||||
body = body.replace("\n", "\n\n")
|
||||
with CustomRenderer() as renderer:
|
||||
body_md = renderer.render(mistletoe.Document(body))
|
||||
body_html = sanitize(body_md, linkgen=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue