fix typos in escape() and print_form()
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 @@
 	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 ):