diff --git a/searx/search.py b/searx/search.py index a2c1c85f2..9c7142c74 100644 --- a/searx/search.py +++ b/searx/search.py @@ -279,10 +279,13 @@ def get_search_query_from_webapp(preferences, form): query_timeout = raw_text_query.timeout_limit if query_timeout is None and 'timeout_limit' in form: raw_time_limit = form.get('timeout_limit') - try: - query_timeout = float(raw_time_limit) - except ValueError: - raise SearxParameterException('timeout_limit', raw_time_limit) + if raw_time_limit in ['None', '']: + raw_time_limit = None + else: + try: + query_timeout = float(raw_time_limit) + except ValueError: + raise SearxParameterException('timeout_limit', raw_time_limit) # query_categories query_categories = [] diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index ce557daf9..9a95265b9 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -5,7 +5,7 @@ - + {% if timeout_limit %}{% endif %} {%- endmacro %} {%- macro search_url() %}{{ base_url }}?q={{ q|urlencode }}{% if selected_categories %}&categories={{ selected_categories|join(",") | replace(' ','+') }}{% endif %}{% if pageno > 1 %}&pageno={{ pageno }}{% endif %}{% if time_range %}&time_range={{ time_range }}{% endif %}{% if current_language != 'all' %}&language={{ current_language }}{% endif %}{% endmacro -%}