Always sort keys when encoding a query

This commit is contained in:
Kovid Goyal 2017-04-25 21:09:55 +05:30
parent a005b125cd
commit ae0a45b0be
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -19,7 +19,7 @@ def encode_query(query, qchar):
if not query: if not query:
return '' return ''
qchar = qchar or '?' qchar = qchar or '?'
keys = Object.keys(query) keys = Object.keys(query).sort()
ans = '' ans = ''
if keys.length: if keys.length:
for k in keys: for k in keys: