diff options
author | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2015-01-10 19:55:21 +0100 |
---|---|---|
committer | Thomas Pointhuber <thomas.pointhuber@gmx.at> | 2015-01-10 19:55:21 +0100 |
commit | c19b0899a415fa3be7c1f30258c218868ef0b671 (patch) | |
tree | f54c6dbd993e7611ba5d69dd896789cdf5adbc7e /searx/autocomplete.py | |
parent | eb6f3348c43f3456fa40716589967ec8a5ec53e2 (diff) | |
download | searxng-c19b0899a415fa3be7c1f30258c218868ef0b671.tar.gz searxng-c19b0899a415fa3be7c1f30258c218868ef0b671.zip |
[fix] little autocompleter fix
Diffstat (limited to 'searx/autocomplete.py')
-rw-r--r-- | searx/autocomplete.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/autocomplete.py b/searx/autocomplete.py index ad5099347..7ebebf1de 100644 --- a/searx/autocomplete.py +++ b/searx/autocomplete.py @@ -52,7 +52,7 @@ def searx_bang(full_query): # check if query starts with engine name for engine in engines: - if engine.startswith(engine_query): + if engine.startswith(engine_query.replace('_', ' ')): results.append('!{engine}'.format(engine=engine.replace(' ', '_'))) # check if query starts with engine shortcut @@ -86,7 +86,7 @@ def searx_bang(full_query): results.append(':{lang_name}'.format(lang_name=lang_name)) # check if query starts with country - if country.startswith(engine_query): + if country.startswith(engine_query.replace('_', ' ')): results.append(':{country}'.format(country=country.replace(' ', '_'))) # remove duplicates |