Kaydet (Commit) 6576dd6a authored tarafından Guido van Rossum's avatar Guido van Rossum

Document new 'quote' flag to cgi.escape().

üst 64c66209
...@@ -219,10 +219,12 @@ content-type and a dictionary of parameters. ...@@ -219,10 +219,12 @@ content-type and a dictionary of parameters.
HTML. HTML.
\end{funcdesc} \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 sequences. Use this if you need to display text that might contain
such characters in HTML. To translate URLs for inclusion in the HREF such characters in HTML. If the optional flag \var{quote} is true,
attribute of an \code{<A>} tag, use \code{urllib.quote()}. 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} \end{funcdesc}
......
...@@ -219,10 +219,12 @@ content-type and a dictionary of parameters. ...@@ -219,10 +219,12 @@ content-type and a dictionary of parameters.
HTML. HTML.
\end{funcdesc} \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 sequences. Use this if you need to display text that might contain
such characters in HTML. To translate URLs for inclusion in the HREF such characters in HTML. If the optional flag \var{quote} is true,
attribute of an \code{<A>} tag, use \code{urllib.quote()}. 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} \end{funcdesc}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment