forked from Ponysearch/Ponysearch
Deserialize explicitly blank strings
Default behavior of urllib.parse_qs is to discard blank values, causing a preference of none to be deserialized as undefined, using the instance default rather than the selected preference.
This commit is contained in:
parent
b5371b7a85
commit
7cab51f98f
1 changed files with 1 additions and 1 deletions
|
@ -441,7 +441,7 @@ class Preferences:
|
||||||
"""parse (base64) preferences from request (``flask.request.form['preferences']``)"""
|
"""parse (base64) preferences from request (``flask.request.form['preferences']``)"""
|
||||||
bin_data = decompress(urlsafe_b64decode(input_data))
|
bin_data = decompress(urlsafe_b64decode(input_data))
|
||||||
dict_data = {}
|
dict_data = {}
|
||||||
for x, y in parse_qs(bin_data.decode('ascii')).items():
|
for x, y in parse_qs(bin_data.decode('ascii'), keep_blank_values=True).items():
|
||||||
dict_data[x] = y[0]
|
dict_data[x] = y[0]
|
||||||
self.parse_dict(dict_data)
|
self.parse_dict(dict_data)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue