summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--searx/results.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/searx/results.py b/searx/results.py
index ae8cf2498..2e81f5dc4 100644
--- a/searx/results.py
+++ b/searx/results.py
@@ -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