@@ -7,7 +7,7 @@
77 <input type="hidden" name="language" value="{{ current_language }}" />{{- "" -}}
88 {% if timeout_limit %}<input type="hidden" name="timeout_limit" value="{{ timeout_limit|e }}" />{% endif -%}
99{%- endmacro %}
10−{%- macro search_url() %}{{ base_url }}?q={{ q|urlencode }}{% if selected_categories %}&categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&pageno={{ pageno }}{% endif %}{% if time_range %}&time_range={{ time_range }}{% endif %}{% if current_language != 'all' %}&language={{ current_language }}{% endif %}{% endmacro -%}
10+{%- macro search_url() %}{{ url_for('search', _external=True) }}?q={{ q|urlencode }}{% if selected_categories %}&categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&pageno={{ pageno }}{% endif %}{% if time_range %}&time_range={{ time_range }}{% endif %}{% if current_language != 'all' %}&language={{ current_language }}{% endif %}{% endmacro -%}
1111
1212{% block title %}{{ q|e }} - {% endblock %}
1313{% block meta %}{{" "}}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ search_url() }}&format=rss">{% endblock %}
@@ -42,7 +42,7 @@
4242 </div>
4343 <div class="panel-body">
4444 {% for suggestion in suggestions %}
45− <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} suggestion_item">
45+ <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" role="navigation" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} suggestion_item">
4646 {% if current_language != 'all' %}
4747 <input type="hidden" name="language" value="{{ current_language }}">
4848 {% endif %}
@@ -71,7 +71,7 @@
7171 <label>{{ _('Download results') }}</label>
7272 <div class="clearfix"></div>
7373 {% for output_type in ('csv', 'json', 'rss') %}
74− <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} result_download">
74+ <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} result_download">
7575 {{- search_form_attrs(pageno) -}}
7676 <input type="hidden" name="format" value="{{ output_type }}">{{- "" -}}
7777 <button type="submit" class="btn btn-default">{{ output_type }}</button>{{- "" -}}
@@ -92,7 +92,7 @@
9292 <div class="clearfix">
9393 <span class="result_header text-muted form-inline pull-left suggestion_item">{{ _('Try searching for:') }}</span>
9494 {% for correction in corrections -%}
95− <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation" class="form-inline pull-left suggestion_item">{{- "" -}}
95+ <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" role="navigation" class="form-inline pull-left suggestion_item">{{- "" -}}
9696 {% if current_language != 'all' %}
9797 <input type="hidden" name="language" value="{{ current_language }}">
9898 {% endif %}
@@ -140,13 +140,13 @@
140140 {% if rtl %}
141141 <div id="pagination">
142142 <div class="pull-left">{{- "" -}}
143− <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
143+ <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="pull-left">
144144 {{- search_form_attrs(pageno+1) -}}
145145 <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-backward"></span> {{ _('next page') }}</button>{{- "" -}}
146146 </form>{{- "" -}}
147147 </div>
148148 <div class="pull-right">{{- "" -}}
149− <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
149+ <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="pull-left">
150150 {{- search_form_attrs(pageno-1) -}}
151151 <button type="submit" class="btn btn-default" {% if pageno == 1 %}disabled{% endif %}><span class="glyphicon glyphicon-forward"></span> {{ _('previous page') }}</button>{{- "" -}}
152152 </form>{{- "" -}}
@@ -156,13 +156,13 @@
156156 {% else %}
157157 <div id="pagination">
158158 <div class="pull-left">{{- "" -}}
159− <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
159+ <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="pull-left">
160160 {{- search_form_attrs(pageno-1) -}}
161161 <button type="submit" class="btn btn-default" {% if pageno == 1 %}disabled{% endif %}><span class="glyphicon glyphicon-backward"></span> {{ _('previous page') }}</button>{{- "" -}}
162162 </form>{{- "" -}}
163163 </div>
164164 <div class="pull-right">{{- "" -}}
165− <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
165+ <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}" class="pull-left">
166166 {{- search_form_attrs(pageno+1) -}}
167167 <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-forward"></span> {{ _('next page') }}</button>{{- "" -}}
168168 </form>{{- "" -}}