diff options
author | rachmadani haryono <rachmadaniHaryono@users.noreply.github.com> | 2019-07-17 15:42:40 +0800 |
---|---|---|
committer | Alexandre Flament <alex@al-f.net> | 2019-07-17 09:42:40 +0200 |
commit | 8f44014627ff26019c0ffc01f77394f56dfb7db1 (patch) | |
tree | 36df76629d8e1b08fa07ef9038d1674b63a788dc /searx/preferences.py | |
parent | 582f3bfcbc468ba3fd4dec09e81be7ecd42bcbff (diff) | |
download | searxng-8f44014627ff26019c0ffc01f77394f56dfb7db1.tar.gz searxng-8f44014627ff26019c0ffc01f77394f56dfb7db1.zip |
[fix] preference query parameter decoding (#1599)
Fix issue #1598
Diffstat (limited to 'searx/preferences.py')
-rw-r--r-- | searx/preferences.py | 5 |
1 files changed, 4 insertions, 1 deletions
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(): |