From a1f99195873ac584ad5f5086a924ad9ee3cb322d Mon Sep 17 00:00:00 2001 From: Markus Heiser Date: Wed, 29 Sep 2021 08:08:18 +0200 Subject: [PATCH] [fix] engine stackexchange - decode HTML entities in title & content Signed-off-by: Markus Heiser --- searx/engines/stackexchange.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/searx/engines/stackexchange.py b/searx/engines/stackexchange.py index e4092c26..34cba687 100644 --- a/searx/engines/stackexchange.py +++ b/searx/engines/stackexchange.py @@ -6,6 +6,7 @@ """ +import html from json import loads from urllib.parse import urlencode @@ -57,8 +58,8 @@ def response(resp): results.append({ 'url': "https://%s.com/q/%s" % (api_site, result['question_id']), - 'title': result['title'], - 'content': content, + 'title': html.unescape(result['title']), + 'content': html.unescape(content), }) return results