mirror of https://github.com/searxng/searxng.git
[fix] preserve bangs in suggestions and corrections
This commit is contained in:
parent
40272b0044
commit
6626f01365
|
@ -21,7 +21,7 @@
|
|||
<span class="result_header text-muted form-inline pull-left suggestion_item">{{ _('Try searching for:') }}</span>
|
||||
{% for correction in corrections %}
|
||||
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation" class="form-inline pull-left suggestion_item">
|
||||
<input type="hidden" name="q" value="{{ correction }}">
|
||||
<input type="hidden" name="q" value="{{ query_prefix + correction }}">
|
||||
<button type="submit" class="btn btn-default btn-xs">{{ correction }}</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
|
@ -118,7 +118,7 @@
|
|||
<div class="panel-body">
|
||||
{% for suggestion in suggestions %}
|
||||
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} suggestion_item">
|
||||
<input type="hidden" name="q" value="{{ suggestion }}">
|
||||
<input type="hidden" name="q" value="{{ query_prefix + suggestion }}">
|
||||
<button type="submit" class="btn btn-default btn-xs">{{ suggestion }}</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
|
|
|
@ -584,6 +584,7 @@ def index():
|
|||
'results.html',
|
||||
results=results,
|
||||
q=request.form['q'],
|
||||
query_prefix=u''.join((request.form['q']).rsplit(search_query.query.decode('utf-8'), 1)),
|
||||
selected_categories=search_query.categories,
|
||||
pageno=search_query.pageno,
|
||||
time_range=search_query.time_range,
|
||||
|
|
Loading…
Reference in New Issue