diff options
author | Adam Tauber <asciimoo@gmail.com> | 2021-03-02 14:24:55 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2021-03-06 12:12:35 +0100 |
commit | 44f4a9d49a0d78668b37fca8558ae63c5fdef271 (patch) | |
tree | 5eb04f4a6efc0537fc21d019990428b4a9b5c4b6 /searx/templates/simple/results.html | |
parent | 87f4cc4a9e51f1215f1450ea056ac40e7a961978 (diff) | |
download | searxng-44f4a9d49a0d78668b37fca8558ae63c5fdef271.tar.gz searxng-44f4a9d49a0d78668b37fca8558ae63c5fdef271.zip |
[enh] add ability to send engine data to subsequent requests
Diffstat (limited to 'searx/templates/simple/results.html')
-rw-r--r-- | searx/templates/simple/results.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/searx/templates/simple/results.html b/searx/templates/simple/results.html index 936de8831..7ece6c7ad 100644 --- a/searx/templates/simple/results.html +++ b/searx/templates/simple/results.html @@ -1,5 +1,12 @@ {% extends "simple/base.html" %} {% from 'simple/macros.html' import icon, icon_small %} +{% macro engine_data_form(engine_data) -%} + {% for engine_name, kv_data in engine_data.items() %} + {% for k, v in kv_data.items() %} + <input type="hidden" name="engine_data-{{ engine_name }}-{{ k|e }}" value="{{ v|e }}" /> + {% endfor %} + {% endfor %} +{%- endmacro %} {% block title %}{% if method == 'GET' %}{{- q|e -}} -{% endif %}{% endblock %} {% block meta %}<link rel="alternate" type="application/rss+xml" title="Searx search: {{ q|e }}" href="{{ url_for('search', _external=True) }}?q={{ q|urlencode }}&categories={{ selected_categories|join(",") | replace(' ','+') }}&pageno={{ pageno }}&time_range={{ time_range }}&language={{ current_language }}&safesearch={{ safesearch }}&format=rss">{% endblock %} {% block content %} @@ -136,6 +143,7 @@ <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}"> <div class="{% if rtl %}right{% else %}left{% endif %}"> <input type="hidden" name="q" value="{{ q|e }}" > + {{- engine_data_form(engine_data) -}} {% for category in selected_categories %} <input type="hidden" name="category_{{ category }}" value="1" > {% endfor %} @@ -152,6 +160,7 @@ <form method="{{ method or 'POST' }}" action="{{ url_for('search') }}"> <div class="{% if rtl %}left{% else %}right{% endif %}"> <input type="hidden" name="q" value="{{ q|e }}" > + {{- engine_data_form(engine_data) -}} {% for category in selected_categories %} <input type="hidden" name="category_{{ category }}" value="1" > {% endfor %} |