diff options
author | Alexandre Flament <alex@al-f.net> | 2017-01-20 18:52:47 +0100 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2017-01-20 18:52:47 +0100 |
commit | 15eef0ebdb15af80c026302bef250dc7f4417951 (patch) | |
tree | c1e5ab56359ed3f23a17e6721cae1c4fbf6d88af /searx/templates | |
parent | 7fdfeca3a43e0e2bd8ef2dcb27cca7745edf596a (diff) | |
download | searxng-15eef0ebdb15af80c026302bef250dc7f4417951.tar.gz searxng-15eef0ebdb15af80c026302bef250dc7f4417951.zip |
[enh] validate input and raise an exception inside search.py. The exception message is output in json and rss format.
Diffstat (limited to 'searx/templates')
-rw-r--r-- | searx/templates/__common__/opensearch_response_rss.xml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/searx/templates/__common__/opensearch_response_rss.xml b/searx/templates/__common__/opensearch_response_rss.xml index ddb60fa5e..32c42e7c7 100644 --- a/searx/templates/__common__/opensearch_response_rss.xml +++ b/searx/templates/__common__/opensearch_response_rss.xml @@ -11,6 +11,12 @@ <opensearch:itemsPerPage>{{ number_of_results }}</opensearch:itemsPerPage> <atom:link rel="search" type="application/opensearchdescription+xml" href="{{ base_url }}opensearch.xml"/> <opensearch:Query role="request" searchTerms="{{ q|e }}" startPage="1" /> + {% if error_message %} + <item> + <title>Error</title> + <description>{{ error_message|e }}</description> + </item> + {% endif %} {% for r in results %} <item> <title>{{ r.title }}</title> |