Przeglądaj źródła

[fix] not highlighting Nonetype

asciimoo 11 lat temu
rodzic
commit
5f065886ff
1 zmienionych plików z 3 dodań i 0 usunięć
  1. 3
    0
      searx/engines/__init__.py

+ 3
- 0
searx/engines/__init__.py Wyświetl plik

107
     return process_callback
107
     return process_callback
108
 
108
 
109
 def highlight_content(content, query):
109
 def highlight_content(content, query):
110
+
111
+    if not content:
112
+        return None
110
     # ignoring html contents
113
     # ignoring html contents
111
     # TODO better html content detection
114
     # TODO better html content detection
112
     if content.find('<') != -1:
115
     if content.find('<') != -1: