dffd
This commit is contained in:
parent
5c7d96660d
commit
922d950cb9
1 changed files with 4 additions and 5 deletions
|
@ -89,11 +89,6 @@ def settings_profile_post(v):
|
|||
if request.values.get("bio"):
|
||||
bio = request.values.get("bio")[:1500]
|
||||
|
||||
if bio == v.bio:
|
||||
return render_template("settings_profile.html",
|
||||
v=v,
|
||||
error="You didn't change anything")
|
||||
|
||||
for i in re.finditer('^(https:\/\/.*\.(png|jpg|jpeg|gif|PNG|JPG|JPEG|GIF|9999))', bio, re.MULTILINE): bio = bio.replace(i.group(1), f'})')
|
||||
bio = bio.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")
|
||||
|
||||
|
@ -115,6 +110,10 @@ def settings_profile_post(v):
|
|||
|
||||
bio += f"\n\n"
|
||||
|
||||
if bio == v.bio:
|
||||
return render_template("settings_profile.html",
|
||||
v=v,
|
||||
error="You didn't change anything")
|
||||
|
||||
with CustomRenderer() as renderer: bio_html = renderer.render(mistletoe.Document(bio))
|
||||
bio_html = sanitize(bio_html)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue