Browse Source

[fix] wikipedia: remove HTML from the title

fr.wikipedia.org (and it seems not other wikipedia websites),
adds HTML to api_result['displayTitle'].
(Search for '!wp :fr Braid' for example)

The commit uses api_result['title']
Alexandre Flament 4 years ago
parent
commit
fcfcf662ff
1 changed files with 1 additions and 1 deletions
  1. 1 1
      searx/engines/wikipedia.py

+ 1 - 1
searx/engines/wikipedia.py

@@ -76,7 +76,7 @@ def response(resp):
     if api_result.get('type') != 'standard':
     if api_result.get('type') != 'standard':
         return []
         return []
 
 
-    title = api_result['displaytitle']
+    title = api_result['title']
     wikipedia_link = api_result['content_urls']['desktop']['page']
     wikipedia_link = api_result['content_urls']['desktop']['page']
 
 
     results.append({'url': wikipedia_link, 'title': title})
     results.append({'url': wikipedia_link, 'title': title})