From 97b2fa229c219652b83fb22670f1b6af4d3a18c3 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Tue, 2 Aug 2005 02:50:25 +0000 Subject: [PATCH] Bring cgi.escape docstring slightly more in line with the library ref manual. Closes #1243553. --- Lib/cgi.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(">", ">") -- 2.40.0