Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(64181)

Unified Diff: Doc/library/cgi.rst

Issue 2830: Copy cgi.escape() to html
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Doc/howto/webservers.rst ('k') | Doc/library/html.rst » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Doc/library/cgi.rst
===================================================================
--- Doc/library/cgi.rst (revision 84355)
+++ Doc/library/cgi.rst (working copy)
@@ -321,18 +321,10 @@
.. function:: escape(s, quote=False)
- Convert the characters ``'&'``, ``'<'`` and ``'>'`` in string *s* to HTML-safe
- sequences. Use this if you need to display text that might contain such
- characters in HTML. If the optional flag *quote* is true, the quotation mark
- character (``"``) is also translated; this helps for inclusion in an HTML
- attribute value delimited by double quotes, as in ``<a href="...">``. Note
- that single quotes are never translated.
+ This function is deprecated in this module. Use :func:`html.escape`
+ instead. It is maintained here only for backward compatibility.
- If the value to be quoted might include single- or double-quote characters,
- or both, consider using the :func:`~xml.sax.saxutils.quoteattr` function in the
- :mod:`xml.sax.saxutils` module instead.
-
.. _cgi-security:
Caring about security
« no previous file with comments | « Doc/howto/webservers.rst ('k') | Doc/library/html.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+