]> granicus.if.org Git - python/commitdiff
#9061: warn that single quotes are not escaped.
authorGeorg Brandl <georg@python.org>
Mon, 2 Aug 2010 18:30:48 +0000 (18:30 +0000)
committerGeorg Brandl <georg@python.org>
Mon, 2 Aug 2010 18:30:48 +0000 (18:30 +0000)
Doc/library/cgi.rst

index efee71119fcc2f2968c171abb203e01ed650e39b..f0c0a075f5a9651267d420fb3d1bdf0b6e310f5d 100644 (file)
@@ -349,10 +349,13 @@ algorithms implemented in this module in other circumstances.
    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, as in ``<A HREF="...">``.  If the value to be quoted might
-   include single- or double-quote characters, or both, consider using the
-   :func:`quoteattr` function in the :mod:`xml.sax.saxutils` module instead.
+   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.
+
+   If the value to be quoted might include single- or double-quote characters,
+   or both, consider using the :func:`quoteattr` function in the
+   :mod:`xml.sax.saxutils` module instead.
 
 
 .. _cgi-security: