[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:
Bnyro
2026-08-03 19:17:57 +02:00
parent 0734ee6c71
commit aa059419ff
-1
View File
@@ -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)