diff options
| author | asciimoo <asciimoo@gmail.com> | 2013-12-16 14:06:53 +0100 |
|---|---|---|
| committer | asciimoo <asciimoo@gmail.com> | 2013-12-16 14:06:53 +0100 |
| commit | 5f065886ff3c80001699521458f0620d8c758ff3 (patch) | |
| tree | e03593c4e1f45fc5afd09e69cf8e24c40e2e7ed1 | |
| parent | 88b5169f8df5c9d9ec5e2aef79408fc536b23adc (diff) | |
[fix] not highlighting Nonetype
| -rw-r--r-- | searx/engines/__init__.py | 3 |
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: |