on master help sign in
[fix] not highlighting Nonetype
commit5f065886ff3c80001699521458f0620d8c758ff3 authorasciimoo <asciimoo@gmail.com> dateMon 16 Dec 2013, 14:06 (13 years ago) parent88b5169
1 file changed+3
searx/engines/__init__.py+3
searx/engines/__init__.py+3
@@ -107,6 +107,9 @@ def make_callback(engine_name, results, suggestions, callback, params):
107107 return process_callback
108108
109109def highlight_content(content, query):
110+
111+ if not content:
112+ return None
110113 # ignoring html contents
111114 # TODO better html content detection
112115 if content.find('<') != -1: