master
Aevann1 2021-08-31 14:08:18 +02:00
parent b8ecadac49
commit a714605b8e
1 changed files with 4 additions and 1 deletions

View File

@ -97,7 +97,10 @@ def settings_profile_post(v):
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")
with CustomRenderer() as renderer: bio_html = renderer.render(mistletoe.Document(bio))
bio_html = sanitize(bio_html)
if len(bio_html) > 10000:
return render_template("settings_profile.html",
v=v,
error="Your bio is too long")
# Run safety filter
bans = filter_comment_html(bio_html)