From: Skip Montanaro Date: Tue, 2 Aug 2005 02:50:25 +0000 (+0000) Subject: Bring cgi.escape docstring slightly more in line with the library ref X-Git-Tag: v2.5a0~1551 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97b2fa229c219652b83fb22670f1b6af4d3a18c3;p=python Bring cgi.escape docstring slightly more in line with the library ref manual. Closes #1243553. --- diff --git a/Lib/cgi.py b/Lib/cgi.py index 1a998685a1..eb963037f1 100755 --- a/Lib/cgi.py +++ b/Lib/cgi.py @@ -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("&", "&") # Must be done first! s = s.replace("<", "<") s = s.replace(">", ">")