Unnamed repository; edit this file 'description' to name the repository.
commit: b09aaf126e38106682e88e4fcd2760344fd839f2
parent: 333b6759ace92e4e16279dc200c3ed53c37446f0
Author: Adam Tauber <asciimoo@gmail.com>
Date:   Tue, 19 May 2015 11:16:57 +0200

[mod] allow whitespaces in category/engine list


searx/search.py | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/searx/search.py b/searx/search.py @@ -386,11 +386,11 @@ class Search(object): load_default_categories = True for pd_name, pd in self.request_data.items(): if pd_name == 'categories': - self.categories.extend(categ for categ in pd.split(',') if categ in categories) + self.categories.extend(categ.strip() for categ in pd.split(',') if categ in categories) elif pd_name == 'engines': pd_engines = [{'category': engines[engine].categories[0], 'name': engine} - for engine in pd.split(',') if engine in engines] + for engine in map(str.strip, pd.split(',')) if engine in engines] if pd_engines: self.engines.extend(pd_engines) load_default_categories = False