From 5f065886ff3c80001699521458f0620d8c758ff3 Mon Sep 17 00:00:00 2001 From: asciimoo Date: Mon, 16 Dec 2013 14:06:53 +0100 Subject: [PATCH] [fix] not highlighting Nonetype --- searx/engines/__init__.py | 3 +++ 1 file changed, 3 insertions(+) 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: