This commit is contained in:
Aevann1 2022-02-22 12:38:28 +02:00
parent 79c99b812c
commit 37eec8d46b
3 changed files with 20 additions and 22 deletions

View file

@ -862,7 +862,7 @@ def submit_post(v, sub=None):
return render_template("submit.html", SUBS=SUBS, v=v, error=error, title=title, url=url, body=body, ghost=submit_ghost(v,g.db)), 400
sub = request.values.get("sub")
sub = request.values.get("sub").replace('/s/','')
if sub and sub != 'none':
sub = g.db.query(Sub.name).filter_by(name=sub.strip().lower()).one_or_none()