mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
From: Clarence Gardner <clarence@king.silcom.com>
The function parse_qs currently calls urllib.unquote on the value of the field submitted, but not on the name. It needs to do both.
This commit is contained in:
parent
97227814a9
commit
5f32248d56
1 changed files with 2 additions and 2 deletions
|
@ -412,7 +412,7 @@ backwards compatible and debugging classes and functions?
|
||||||
|
|
||||||
# " <== Emacs font-lock de-bogo-kludgificocity
|
# " <== Emacs font-lock de-bogo-kludgificocity
|
||||||
|
|
||||||
__version__ = "2.1"
|
__version__ = "2.2"
|
||||||
|
|
||||||
|
|
||||||
# Imports
|
# Imports
|
||||||
|
@ -556,7 +556,7 @@ def parse_qs(qs, keep_blank_values=0, strict_parsing=0):
|
||||||
if strict_parsing:
|
if strict_parsing:
|
||||||
raise ValueError, "bad query field: %s" % `name_value`
|
raise ValueError, "bad query field: %s" % `name_value`
|
||||||
continue
|
continue
|
||||||
name = nv[0]
|
name = urllib.unquote(regsub.gsub('+', ' ', nv[0]))
|
||||||
value = urllib.unquote(regsub.gsub('+', ' ', nv[1]))
|
value = urllib.unquote(regsub.gsub('+', ' ', nv[1]))
|
||||||
if len(value) or keep_blank_values:
|
if len(value) or keep_blank_values:
|
||||||
if dict.has_key (name):
|
if dict.has_key (name):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue