dfdf
This commit is contained in:
parent
2ced982413
commit
ddd7f67936
2 changed files with 3 additions and 3 deletions
|
@ -260,7 +260,7 @@ def edit_post(pid, v):
|
||||||
abort(403)
|
abort(403)
|
||||||
|
|
||||||
body = request.form.get("body", "")
|
body = request.form.get("body", "")
|
||||||
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif))', body.lower(), re.MULTILINE): body = body.replace(i.group(1), f'})')
|
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif))', body.lower(), re.MULTILINE): body = body.replace(i.group(1), f'})').replace(i.group(1).upper(), f'})')
|
||||||
body = body.replace("\n", "\n\n")
|
body = body.replace("\n", "\n\n")
|
||||||
with CustomRenderer() as renderer:
|
with CustomRenderer() as renderer:
|
||||||
body_md = renderer.render(mistletoe.Document(body))
|
body_md = renderer.render(mistletoe.Document(body))
|
||||||
|
@ -794,7 +794,7 @@ def submit_post(v):
|
||||||
}
|
}
|
||||||
|
|
||||||
# render text
|
# render text
|
||||||
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif))', body.lower(), re.MULTILINE): body = body.replace(i.group(1), f'})')
|
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif))', body.lower(), re.MULTILINE): body = body.replace(i.group(1), f'})').replace(i.group(1).upper(), f'})')
|
||||||
body = body.replace("\n", "\n\n")
|
body = body.replace("\n", "\n\n")
|
||||||
with CustomRenderer() as renderer:
|
with CustomRenderer() as renderer:
|
||||||
body_md = renderer.render(mistletoe.Document(body))
|
body_md = renderer.render(mistletoe.Document(body))
|
||||||
|
|
|
@ -69,7 +69,7 @@ def settings_profile_post(v):
|
||||||
v=v,
|
v=v,
|
||||||
error="You didn't change anything")
|
error="You didn't change anything")
|
||||||
|
|
||||||
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif))', bio.lower(), re.MULTILINE): bio = bio.replace(i.group(1), f'})')
|
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif))', bio.lower(), re.MULTILINE): bio = bio.replace(i.group(1), f'})').replace(i.group(1).upper(), f'})')
|
||||||
bio = bio.replace("\n", "\n\n")
|
bio = bio.replace("\n", "\n\n")
|
||||||
with CustomRenderer() as renderer:
|
with CustomRenderer() as renderer:
|
||||||
bio_html = renderer.render(mistletoe.Document(bio))
|
bio_html = renderer.render(mistletoe.Document(bio))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue