From 5fbea0b62df9877b4c07489ca631ced7af0d939b Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Tue, 29 Oct 2024 15:09:40 +0100 Subject: [PATCH] [refactor] element isn't a part of the RSS 2.0 spec [1] [1] https://cyber.harvard.edu/rss/rss.html Signed-off-by: Markus Heiser --- searx/static/themes/simple/xsl/rss.xsl | 86 +++++++------------ .../simple/opensearch_response_rss.xml | 25 +----- searx/webapp.py | 3 - 3 files changed, 34 insertions(+), 80 deletions(-) diff --git a/searx/static/themes/simple/xsl/rss.xsl b/searx/static/themes/simple/xsl/rss.xsl index a8d9225f5..7de7f8037 100644 --- a/searx/static/themes/simple/xsl/rss.xsl +++ b/searx/static/themes/simple/xsl/rss.xsl @@ -1,59 +1,39 @@ - - - - - <xsl:value-of select="channel/title" /> RSS Feed - - - - - - -
-

- -

-
-
-
- - - -
- - + + + <xsl:value-of select="channel/title" />RSS Feed + + + + + +
+

+ +

+
+
+
+ + + +
+ +
-
diff --git a/searx/templates/simple/opensearch_response_rss.xml b/searx/templates/simple/opensearch_response_rss.xml index b827bae85..574f32e69 100644 --- a/searx/templates/simple/opensearch_response_rss.xml +++ b/searx/templates/simple/opensearch_response_rss.xml @@ -21,34 +21,11 @@ {% for r in results %} {{ r.title }} + result {{ r.url }} {{ r.content }} {% if r.pubdate %}{{ r.pubdate }}{% endif %} {% endfor %} - {% if answers %} - {% for a in answers %} - - {{ a }} - answer - - {% endfor %} - {% endif %} - {% if corrections %} - {% for a in corrections %} - - {{ a }} - correction - - {% endfor %} - {% endif %} - {% if suggestions %} - {% for a in suggestions %} - - {{ a }} - suggestion - - {% endfor %} - {% endif %} diff --git a/searx/webapp.py b/searx/webapp.py index 1c0158382..8158256e6 100755 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -731,9 +731,6 @@ def search(): response_rss = render( 'opensearch_response_rss.xml', results=results, - answers=result_container.answers, - corrections=result_container.corrections, - suggestions=result_container.suggestions, q=request.form['q'], number_of_results=result_container.number_of_results, )