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'],
|
||||
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'])
|
||||
|
||||
|
|
Loading…
Reference in New Issue