diff options
-rwxr-xr-x | Lib/cgi.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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('&', '&') # Must be done first - s = regsub.gsub('<', '<') - s = regsub.gsub('>', '>') + s = regsub.gsub('&', '&', s) # Must be done first + s = regsub.gsub('<', '<', s) + s = regsub.gsub('>', '>', s) return s def test( what ): |