summaryrefslogtreecommitdiff
path: root/searx/webapp.py
diff options
context:
space:
mode:
Diffstat (limited to 'searx/webapp.py')
-rw-r--r--searx/webapp.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/searx/webapp.py b/searx/webapp.py
index f90299b2a..dd93395ee 100644
--- a/searx/webapp.py
+++ b/searx/webapp.py
@@ -403,11 +403,15 @@ def pre_request():
for k, v in request.args.items():
if k not in request.form:
request.form[k] = v
- try:
- preferences.parse_dict(request.form)
- except Exception as e:
- logger.exception('invalid settings')
- request.errors.append(gettext('Invalid settings'))
+
+ if request.form.get('preferences'):
+ preferences.parse_encoded_data(request.form['preferences'])
+ else:
+ try:
+ preferences.parse_dict(request.form)
+ except Exception as e:
+ logger.exception('invalid settings')
+ request.errors.append(gettext('Invalid settings'))
# request.user_plugins
request.user_plugins = []