diff options
author | Guido van Rossum <guido@python.org> | 1997-07-19 20:16:07 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-07-19 20:16:07 (GMT) |
commit | 6576dd6ad6fed997ef3e622cad390ce8c9311200 (patch) | |
tree | 96a6ca36c09e9e6353c13d4a3d0d5fc20246dbba | |
parent | 64c66209343edbdb212678759bc6e32a897b3a13 (diff) | |
download | cpython-6576dd6ad6fed997ef3e622cad390ce8c9311200.zip cpython-6576dd6ad6fed997ef3e622cad390ce8c9311200.tar.gz cpython-6576dd6ad6fed997ef3e622cad390ce8c9311200.tar.bz2 |
Document new 'quote' flag to cgi.escape().
-rw-r--r-- | Doc/lib/libcgi.tex | 8 | ||||
-rw-r--r-- | Doc/libcgi.tex | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/Doc/lib/libcgi.tex b/Doc/lib/libcgi.tex index 56643d0..4d0c5d6 100644 --- a/Doc/lib/libcgi.tex +++ b/Doc/lib/libcgi.tex @@ -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} diff --git a/Doc/libcgi.tex b/Doc/libcgi.tex index 56643d0..4d0c5d6 100644 --- a/Doc/libcgi.tex +++ b/Doc/libcgi.tex @@ -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} |