summaryrefslogtreecommitdiffstats
path: root/Lib/cgi.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-04-11 18:20:42 (GMT)
committerGuido van Rossum <guido@python.org>1997-04-11 18:20:42 (GMT)
commit5f32248d56909e83c7f48db936bdc021f36eede6 (patch)
tree3087b9b8a2feffe7e4009e17ed330f8b31dc1426 /Lib/cgi.py
parent97227814a95769753cc9334048f1dedfa7024720 (diff)
downloadcpython-5f32248d56909e83c7f48db936bdc021f36eede6.zip
cpython-5f32248d56909e83c7f48db936bdc021f36eede6.tar.gz
cpython-5f32248d56909e83c7f48db936bdc021f36eede6.tar.bz2
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.
Diffstat (limited to 'Lib/cgi.py')
-rwxr-xr-xLib/cgi.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/cgi.py b/Lib/cgi.py
index 6cddfba..ccff834 100755
--- a/Lib/cgi.py
+++ b/Lib/cgi.py
@@ -412,7 +412,7 @@ backwards compatible and debugging classes and functions?
# " <== Emacs font-lock de-bogo-kludgificocity
-__version__ = "2.1"
+__version__ = "2.2"
# Imports
@@ -556,7 +556,7 @@ def parse_qs(qs, keep_blank_values=0, strict_parsing=0):
if strict_parsing:
raise ValueError, "bad query field: %s" % `name_value`
continue
- name = nv[0]
+ name = urllib.unquote(regsub.gsub('+', ' ', nv[0]))
value = urllib.unquote(regsub.gsub('+', ' ', nv[1]))
if len(value) or keep_blank_values:
if dict.has_key (name):