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 ````. 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