1
0
mirror of https://github.com/searx/searx synced 2024-12-11 16:35:20 +01:00

Fix unicode error when using saved preferences URL

Closes #2917
Closes #2856
This commit is contained in:
Noémi Ványi 2021-08-07 16:33:47 +02:00
parent 33d674818d
commit 3d2a5061db

View File

@ -438,8 +438,8 @@ class Preferences:
"""parse (base64) preferences from request (``flask.request.form['preferences']``)""" """parse (base64) preferences from request (``flask.request.form['preferences']``)"""
decoded_data = decompress(urlsafe_b64decode(input_data.encode())) decoded_data = decompress(urlsafe_b64decode(input_data.encode()))
dict_data = {} dict_data = {}
for x, y in parse_qs(decoded_data).items(): for x, y in parse_qs(decoded_data.decode()).items():
dict_data[x.decode()] = y[0].decode() dict_data[x] = y[0]
self.parse_dict(dict_data) self.parse_dict(dict_data)
def parse_dict(self, input_data): def parse_dict(self, input_data):