Browse Source

[fix] do not escape empty result content - closes #291

Adam Tauber 10 years ago
parent
commit
f59daa4a4b
1 changed files with 2 additions and 3 deletions
  1. 2 3
      searx/webapp.py

+ 2 - 3
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'])