From 51722109340bf9e4b18d1c4577de7bf5f876ee49 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Thu, 19 Aug 2021 14:46:22 +0200 Subject: [PATCH] erer --- files/routes/posts.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/files/routes/posts.py b/files/routes/posts.py index db59c6df01..abc616ae86 100644 --- a/files/routes/posts.py +++ b/files/routes/posts.py @@ -286,10 +286,9 @@ def edit_post(pid, v): p.body = body p.body_html = body_html - title = filter_title(request.form.get("title")) - + title = request.form.get("title") p.title = title - p.title_html = title + p.title_html = filter_title(title) if int(time.time()) - p.created_utc > 60 * 3: p.edited_utc = int(time.time()) g.db.add(p) @@ -518,7 +517,7 @@ def filter_title(title): @validate_formkey def submit_post(v): - title = filter_title(request.form.get("title", "")) + title = request.form.get("title", "") url = request.form.get("url", "") @@ -781,15 +780,13 @@ def submit_post(v): url = url.replace("https://streamable.com/", "https://streamable.com/e/") - title_html = title - new_post_aux = SubmissionAux(id=new_post.id, url=url, body=body, body_html=body_html, embed_url=embed, title=title, - title_html=title_html + title_html=filter_title(title) ) g.db.add(new_post_aux) g.db.flush()