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
1 changed files with 2 additions and 2 deletions

View File

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