From 7fdfeca3a43e0e2bd8ef2dcb27cca7745edf596a Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Fri, 13 Jan 2017 22:15:11 +0100 Subject: [mod] add a __common__ template that can't be selected but that provides a common place for shared templates. What has been moved into this template : * opensearch*.xml is always the same whatever the themes. * the text inside */about.html --- .../__common__/opensearch_response_rss.xml | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 searx/templates/__common__/opensearch_response_rss.xml (limited to 'searx/templates/__common__/opensearch_response_rss.xml') diff --git a/searx/templates/__common__/opensearch_response_rss.xml b/searx/templates/__common__/opensearch_response_rss.xml new file mode 100644 index 000000000..ddb60fa5e --- /dev/null +++ b/searx/templates/__common__/opensearch_response_rss.xml @@ -0,0 +1,23 @@ + + + + Searx search: {{ q|e }} + {{ base_url }}?q={{ q|e }} + Search results for "{{ q|e }}" - searx + {{ number_of_results }} + 1 + {{ number_of_results }} + + -- cgit v1.2.3 From 15eef0ebdb15af80c026302bef250dc7f4417951 Mon Sep 17 00:00:00 2001 From: Alexandre Flament Date: Fri, 20 Jan 2017 18:52:47 +0100 Subject: [enh] validate input and raise an exception inside search.py. The exception message is output in json and rss format. --- searx/templates/__common__/opensearch_response_rss.xml | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'searx/templates/__common__/opensearch_response_rss.xml') 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 @@ {{ number_of_results }}