summaryrefslogtreecommitdiff
path: root/searx/search.py
diff options
context:
space:
mode:
authorAdam Tauber <asciimoo@gmail.com>2015-08-02 20:29:19 +0200
committerAdam Tauber <asciimoo@gmail.com>2015-08-02 20:32:32 +0200
commit43cd8e0c4129571a263429173c7a9fe7092e1dec (patch)
tree1c425e0ce8219e33c794b03c1b32034f4e545776 /searx/search.py
parentc1d9cfd9ae0cc78b91ee5cc339266c26c09e0e4c (diff)
downloadsearxng-43cd8e0c4129571a263429173c7a9fe7092e1dec.tar.gz
searxng-43cd8e0c4129571a263429173c7a9fe7092e1dec.zip
[enh] default settings option to safe_search - #396
Diffstat (limited to 'searx/search.py')
-rw-r--r--searx/search.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/searx/search.py b/searx/search.py
index bb440352b..5054ce798 100644
--- a/searx/search.py
+++ b/searx/search.py
@@ -23,6 +23,7 @@ from operator import itemgetter
from Queue import Queue
from time import time
from urlparse import urlparse, unquote
+from searx import settings
from searx.engines import (
categories, engines
)
@@ -480,9 +481,9 @@ class Search(object):
try:
# 0 = None, 1 = Moderate, 2 = Strict
- request_params['safesearch'] = int(request.cookies.get('safesearch', 1))
+ request_params['safesearch'] = int(request.cookies.get('safesearch'))
except ValueError:
- request_params['safesearch'] = 1
+ request_params['safesearch'] = settings['search']['safe_search']
# update request parameters dependent on
# search-engine (contained in engines folder)