mirror of
https://github.com/searxng/searxng.git
synced 2024-11-22 12:10:11 +01:00
[fix] searx/results.py: strip result['content'] only if it exists
fix PR #302
This commit is contained in:
parent
75daef8986
commit
d9658a7f91
@ -255,7 +255,8 @@ class ResultContainer:
|
||||
result['url'] = result['parsed_url'].geturl()
|
||||
|
||||
# strip multiple spaces and cariage returns from content
|
||||
result['content'] = WHITESPACE_REGEX.sub(' ', result['content'])
|
||||
if result.get('content'):
|
||||
result['content'] = WHITESPACE_REGEX.sub(' ', result['content'])
|
||||
|
||||
return True
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user