diff options
author | Adam Tauber <asciimoo@gmail.com> | 2015-08-02 20:29:19 +0200 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2015-08-02 20:32:32 +0200 |
commit | 43cd8e0c4129571a263429173c7a9fe7092e1dec (patch) | |
tree | 1c425e0ce8219e33c794b03c1b32034f4e545776 /searx/webapp.py | |
parent | c1d9cfd9ae0cc78b91ee5cc339266c26c09e0e4c (diff) | |
download | searxng-43cd8e0c4129571a263429173c7a9fe7092e1dec.tar.gz searxng-43cd8e0c4129571a263429173c7a9fe7092e1dec.zip |
[enh] default settings option to safe_search - #396
Diffstat (limited to 'searx/webapp.py')
-rw-r--r-- | searx/webapp.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/searx/webapp.py b/searx/webapp.py index 4292b32d7..06f246620 100644 --- a/searx/webapp.py +++ b/searx/webapp.py @@ -312,7 +312,7 @@ def render(template_name, override_theme=None, **kwargs): kwargs['method'] = request.cookies.get('method', 'POST') - kwargs['safesearch'] = request.cookies.get('safesearch', '1') + kwargs['safesearch'] = request.cookies.get('safesearch', str(settings['search']['safe_search'])) # override url_for function in templates kwargs['url_for'] = url_for_theme @@ -542,7 +542,7 @@ def preferences(): locale = None autocomplete = '' method = 'POST' - safesearch = '1' + safesearch = settings['search']['safe_search'] for pd_name, pd in request.form.items(): if pd_name.startswith('category_'): category = pd_name[9:] |