mirror of
https://github.com/searxng/searxng.git
synced 2026-08-03 20:23:02 +02:00
[fix] autocompleter: suggestions contain HTML escape codes
The results were previously HTML-escaped for some reason. That doesn't really make much sense because they never got unescaped anywhere. For example, `A&B` gets escaped to `A&B` and never unescaped, so the autocompletion frontend shows `A&B`, which isn't user-friendly at all. Also, it doesn't make sense to escape the full JSON instead of only escaping the suggestion texts individually because that makes it even more unclear.
This commit is contained in:
@@ -851,7 +851,6 @@ def autocompleter():
|
||||
suggestions = json.dumps([sug_prefix, results, [], [], relevances])
|
||||
mimetype = 'application/x-suggestions+json'
|
||||
|
||||
suggestions = escape(suggestions, False)
|
||||
return Response(suggestions, mimetype=mimetype)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user