diff options
author | Markus Heiser <markus.heiser@darmarit.de> | 2021-09-29 08:08:18 +0200 |
---|---|---|
committer | Markus Heiser <markus.heiser@darmarit.de> | 2021-09-29 08:08:18 +0200 |
commit | ecb3912bd000bddd10841775ecada538386818c5 (patch) | |
tree | e85019c871da040e9af1b2a7c34f8d106ee17d2b /searx/engines | |
parent | 5efe77bdf5dac8e8b14cbd6be39325eb519af79a (diff) | |
download | searxng-ecb3912bd000bddd10841775ecada538386818c5.tar.gz searxng-ecb3912bd000bddd10841775ecada538386818c5.zip |
[fix] engine stackexchange - decode HTML entities in title & content
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'searx/engines')
-rw-r--r-- | searx/engines/stackexchange.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/engines/stackexchange.py b/searx/engines/stackexchange.py index e4092c26f..34cba687c 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 |