logo

searx

My custom branche(s) on searx, a meta-search engine
commit: f59daa4a4b92ae3c6cbe2482a14f50810a15a644
parent: b2e026dde22b3026fb01873c818b295b669025e3
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Sun, 12 Apr 2015 17:37:01 +0200

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

Diffstat:

Msearx/webapp.py5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 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'])