Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] route /autocompleter: escape '<' and '>' in the response

Markus Heiser9a3253fc1682
diff --git a/searx/webapp.py b/searx/webapp.py
index 94d421eb0..613849dc4 100755
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -916,6 +916,7 @@ def autocompleter():
suggestions = json.dumps([sug_prefix, results])
mimetype = 'application/x-suggestions+json'
+ suggestions = escape(suggestions, False)
return Response(suggestions, mimetype=mimetype)