From 8f44014627ff26019c0ffc01f77394f56dfb7db1 Mon Sep 17 00:00:00 2001 From: rachmadani haryono Date: Wed, 17 Jul 2019 15:42:40 +0800 Subject: [fix] preference query parameter decoding (#1599) Fix issue #1598 --- searx/preferences.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'searx/preferences.py') diff --git a/searx/preferences.py b/searx/preferences.py index acaa67f66..30a4252b0 100644 --- a/searx/preferences.py +++ b/searx/preferences.py @@ -292,7 +292,10 @@ class Preferences(object): def parse_encoded_data(self, input_data): decoded_data = decompress(urlsafe_b64decode(input_data.encode('utf-8'))) - self.parse_dict({x: y[0] for x, y in parse_qs(unicode(decoded_data)).items()}) + dict_data = {} + for x, y in parse_qs(decoded_data).items(): + dict_data[x.decode('utf8')] = y[0].decode('utf8') + self.parse_dict(dict_data) def parse_dict(self, input_data): for user_setting_name, user_setting in input_data.items(): -- cgit v1.2.3-54-g00ecf