summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2016-12-09 19:57:28 +0100
committerAdam Tauber <asciimoo@gmail.com>2016-12-09 19:57:28 +0100
commitd80fb2c8e8995facb3a25c152c47a93eecf1fee4 (patch)
tree04505d32ad08cf760dcf6db12613afd8dd34e4d1 /searx/webapp.py
parent72a217f983c935712eb872042157b4432eaec641 (diff)
downloadsearxng-d80fb2c8e8995facb3a25c152c47a93eecf1fee4.tar.gz
searxng-d80fb2c8e8995facb3a25c152c47a93eecf1fee4.zip
[enh] central handling of empty result titles
Diffstat (limited to 'searx/webapp.py')
-rw-r--r--searx/webapp.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index 352a49fb6..cdac52a45 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -435,7 +435,8 @@ def index():
if 'content' in result and result['content']:
result['content'] = highlight_content(escape(result['content'][:1024]),
search_query.query.encode('utf-8'))
- result['title'] = highlight_content(escape(result['title']), search_query.query.encode('utf-8'))
+ result['title'] = highlight_content(escape(result['title'] or u''),
+ search_query.query.encode('utf-8'))
else:
if result.get('content'):
result['content'] = html_to_text(result['content']).strip()