logo

searx

Unnamed repository; edit this file 'description' to name the repository.
commit: 5f065886ff3c80001699521458f0620d8c758ff3
parent: 88b5169f8df5c9d9ec5e2aef79408fc536b23adc
Author: asciimoo <asciimoo@gmail.com>
Date:   Mon, 16 Dec 2013 14:06:53 +0100

[fix] not highlighting Nonetype

Diffstat:

searx/engines/__init__.py | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git 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: