diff options
author | Adam Tauber <asciimoo@gmail.com> | 2015-04-12 17:37:01 +0200 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2015-04-12 17:37:01 +0200 |
commit | f59daa4a4b92ae3c6cbe2482a14f50810a15a644 (patch) | |
tree | 7c75394996df7b11baf1fe33468a11ac88d2c735 | |
parent | b2e026dde22b3026fb01873c818b295b669025e3 (diff) | |
download | searxng-f59daa4a4b92ae3c6cbe2482a14f50810a15a644.tar.gz searxng-f59daa4a4b92ae3c6cbe2482a14f50810a15a644.zip |
[fix] do not escape empty result content - closes #291
-rw-r--r-- | searx/webapp.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 42d004e86..cbdff8962 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -365,11 +365,10 @@ def index(): result['title'] = highlight_content(result['title'], search.query.encode('utf-8')) else: - if 'content' in result: + if result.get('content'): result['content'] = html_to_text(result['content']).strip() # removing html content and whitespace duplications - result['title'] = ' '.join(html_to_text(result['title']) - .strip().split()) + result['title'] = ' '.join(html_to_text(result['title']).strip().split()) result['pretty_url'] = prettify_url(result['url']) |