Bladeren bron

[fix] engine selection from url

Adam Tauber 9 jaren geleden
bovenliggende
commit
8c4d9b79d5
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2
    2
      searx/search.py

+ 2
- 2
searx/search.py Bestand weergeven

@@ -391,11 +391,11 @@ class Search(object):
391 391
             load_default_categories = True
392 392
             for pd_name, pd in self.request_data.items():
393 393
                 if pd_name == 'categories':
394
-                    self.categories.extend(categ.strip() for categ in pd.split(',') if categ in categories)
394
+                    self.categories.extend(categ for categ in map(unicode.strip, pd.split(',')) if categ in categories)
395 395
                 elif pd_name == 'engines':
396 396
                     pd_engines = [{'category': engines[engine].categories[0],
397 397
                                    'name': engine}
398
-                                  for engine in map(str.strip, pd.split(',')) if engine in engines]
398
+                                  for engine in map(unicode.strip, pd.split(',')) if engine in engines]
399 399
                     if pd_engines:
400 400
                         self.engines.extend(pd_engines)
401 401
                         load_default_categories = False