summaryrefslogtreecommitdiffstats
path: root/Lib/cgi.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-03-14 17:22:28 (GMT)
committerGuido van Rossum <guido@python.org>1995-03-14 17:22:28 (GMT)
commitdcce73af48387531e0cef280e27b3689bf7d4b85 (patch)
tree3bf7958596c60f1086d72538414780eb3e03f79a /Lib/cgi.py
parent0012c1ec742555b99ad84b02d646361ef07ba42b (diff)
downloadcpython-dcce73af48387531e0cef280e27b3689bf7d4b85.zip
cpython-dcce73af48387531e0cef280e27b3689bf7d4b85.tar.gz
cpython-dcce73af48387531e0cef280e27b3689bf7d4b85.tar.bz2
fix typos in escape() and print_form()
Diffstat (limited to 'Lib/cgi.py')
-rwxr-xr-xLib/cgi.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/cgi.py b/Lib/cgi.py
index a9599a7..3862cb5 100755
--- a/Lib/cgi.py
+++ b/Lib/cgi.py
@@ -258,13 +258,13 @@ def print_form( form ):
for key in skeys:
print '<dt>', escape(key), ':',
print '<i>', escape(`type(form[key])`), '</i>',
- print '<dd>', escape(form[key])
+ print '<dd>', escape(`form[key]`)
print '</dl>'
def escape( s ):
- s = regsub.gsub('&', '&amp;') # Must be done first
- s = regsub.gsub('<', '&lt;')
- s = regsub.gsub('>', '&gt;')
+ s = regsub.gsub('&', '&amp;', s) # Must be done first
+ s = regsub.gsub('<', '&lt;', s)
+ s = regsub.gsub('>', '&gt;', s)
return s
def test( what ):