forked from zaclys/searxng
[fix] do not escape empty result content - closes #291
This commit is contained in:
parent
b2e026dde2
commit
f59daa4a4b
|
@ -365,11 +365,10 @@ def index():
|
||||||
result['title'] = highlight_content(result['title'],
|
result['title'] = highlight_content(result['title'],
|
||||||
search.query.encode('utf-8'))
|
search.query.encode('utf-8'))
|
||||||
else:
|
else:
|
||||||
if 'content' in result:
|
if result.get('content'):
|
||||||
result['content'] = html_to_text(result['content']).strip()
|
result['content'] = html_to_text(result['content']).strip()
|
||||||
# removing html content and whitespace duplications
|
# removing html content and whitespace duplications
|
||||||
result['title'] = ' '.join(html_to_text(result['title'])
|
result['title'] = ' '.join(html_to_text(result['title']).strip().split())
|
||||||
.strip().split())
|
|
||||||
|
|
||||||
result['pretty_url'] = prettify_url(result['url'])
|
result['pretty_url'] = prettify_url(result['url'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue