]> granicus.if.org Git - python/commitdiff
Bring cgi.escape docstring slightly more in line with the library ref
authorSkip Montanaro <skip@pobox.com>
Tue, 2 Aug 2005 02:50:25 +0000 (02:50 +0000)
committerSkip Montanaro <skip@pobox.com>
Tue, 2 Aug 2005 02:50:25 +0000 (02:50 +0000)
manual.  Closes #1243553.

Lib/cgi.py

index 1a998685a1448e6e16df92fa76c1c3c52b8f8e11..eb963037f11382abde75359a68eef6c11cff34ef 100755 (executable)
@@ -1041,7 +1041,9 @@ environment as well.  Here are some common variable names:
 # =========
 
 def escape(s, quote=None):
-    """Replace special characters '&', '<' and '>' by SGML entities."""
+    '''Replace special characters "&", "<" and ">" to HTML-safe sequences.
+    If the optional flag quote is true, the quotation mark character (")
+    is also translated.'''
     s = s.replace("&", "&amp;") # Must be done first!
     s = s.replace("<", "&lt;")
     s = s.replace(">", "&gt;")