summaryrefslogtreecommitdiff
path: root/searx
diff options
context:
space:
mode:
authorasciimoo <asciimoo@gmail.com>2013-12-16 14:06:53 +0100
committerasciimoo <asciimoo@gmail.com>2013-12-16 14:06:53 +0100
commit5f065886ff3c80001699521458f0620d8c758ff3 (patch)
treee03593c4e1f45fc5afd09e69cf8e24c40e2e7ed1 /searx
parent88b5169f8df5c9d9ec5e2aef79408fc536b23adc (diff)
downloadsearxng-5f065886ff3c80001699521458f0620d8c758ff3.tar.gz
searxng-5f065886ff3c80001699521458f0620d8c758ff3.zip
[fix] not highlighting Nonetype
Diffstat (limited to 'searx')
-rw-r--r--searx/engines/__init__.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/engines/__init__.py b/searx/engines/__init__.py
index 0af977685..43ad1b52e 100644
--- a/searx/engines/__init__.py
+++ b/searx/engines/__init__.py
@@ -107,6 +107,9 @@ def make_callback(engine_name, results, suggestions, callback, params):
return process_callback
def highlight_content(content, query):
+
+ if not content:
+ return None
# ignoring html contents
# TODO better html content detection
if content.find('<') != -1: