Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5f32248

Browse files
committed
From: Clarence Gardner <[email protected]>
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.
1 parent 9722781 commit 5f32248

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/cgi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@
412412

413413
# " <== Emacs font-lock de-bogo-kludgificocity
414414

415-
__version__ = "2.1"
415+
__version__ = "2.2"
416416

417417

418418
# Imports
@@ -556,7 +556,7 @@ def parse_qs(qs, keep_blank_values=0, strict_parsing=0):
556556
if strict_parsing:
557557
raise ValueError, "bad query field: %s" % `name_value`
558558
continue
559-
name = nv[0]
559+
name = urllib.unquote(regsub.gsub('+', ' ', nv[0]))
560560
value = urllib.unquote(regsub.gsub('+', ' ', nv[1]))
561561
if len(value) or keep_blank_values:
562562
if dict.has_key (name):

0 commit comments

Comments
 (0)