]> granicus.if.org Git - python/commitdiff
Document new 'quote' flag to cgi.escape().
authorGuido van Rossum <guido@python.org>
Sat, 19 Jul 1997 20:16:07 +0000 (20:16 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 19 Jul 1997 20:16:07 +0000 (20:16 +0000)
Doc/lib/libcgi.tex
Doc/libcgi.tex

index 56643d05fc4993fc4b5cff3d4f59772aed9895a3..4d0c5d6dcdd36092c0eaef3a3c7247e7043b8257 100644 (file)
@@ -219,10 +219,12 @@ content-type and a dictionary of parameters.
 HTML.
 \end{funcdesc}
 
-\begin{funcdesc}{escape}{}: convert the characters ``\code{\&}'', ``\code{<}'' and ``\code{>}'' to HTML-safe
+\begin{funcdesc}{escape}{s\optional{\, quote}}: convert the characters
+``\code{\&}'', ``\code{<}'' and ``\code{>}'' in string \var{s} to HTML-safe
 sequences.  Use this if you need to display text that might contain
-such characters in HTML.  To translate URLs for inclusion in the HREF
-attribute of an \code{<A>} tag, use \code{urllib.quote()}.
+such characters in HTML.  If the optional flag \var{quote} is true,
+the double quote character (\code{"}) is also translated; this helps
+for inclusion in an HTML attribute value, e.g. in ``\code{<A HREF="...">}''.
 \end{funcdesc}
 
 
index 56643d05fc4993fc4b5cff3d4f59772aed9895a3..4d0c5d6dcdd36092c0eaef3a3c7247e7043b8257 100644 (file)
@@ -219,10 +219,12 @@ content-type and a dictionary of parameters.
 HTML.
 \end{funcdesc}
 
-\begin{funcdesc}{escape}{}: convert the characters ``\code{\&}'', ``\code{<}'' and ``\code{>}'' to HTML-safe
+\begin{funcdesc}{escape}{s\optional{\, quote}}: convert the characters
+``\code{\&}'', ``\code{<}'' and ``\code{>}'' in string \var{s} to HTML-safe
 sequences.  Use this if you need to display text that might contain
-such characters in HTML.  To translate URLs for inclusion in the HREF
-attribute of an \code{<A>} tag, use \code{urllib.quote()}.
+such characters in HTML.  If the optional flag \var{quote} is true,
+the double quote character (\code{"}) is also translated; this helps
+for inclusion in an HTML attribute value, e.g. in ``\code{<A HREF="...">}''.
 \end{funcdesc}