master
Aevann1 2022-02-22 12:58:39 +02:00
parent cced659030
commit d3cbd7cf88
2 changed files with 3 additions and 3 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").replace('/s/','')
sub = request.values.get("sub").replace('/s/','').replace('s/','')
if sub and sub != 'none':
sub = g.db.query(Sub.name).filter_by(name=sub.strip().lower()).one_or_none()

View File

@ -87,11 +87,11 @@
<input list="subs" autocomplete="off" id='sub' class="form-control" form="submitform" name="sub" oninput="savetext()">
<datalist id="subs">
{% if SITE_NAME != 'Ruqqus' %}
<option value="/s/none" selected></option>
<option value="none" selected></option>
{% endif %}
{% for s in SUBS %}
<option value="/s/{{s}}" {% if sub and sub.name == s %}selected{% endif %}></option>
<option value="{{s}}" {% if sub and sub.name == s %}selected{% endif %}></option>
{% endfor %}
</datalist>
</div>