File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -324,10 +324,13 @@ algorithms implemented in this module in other circumstances.
324324 Convert the characters ``'&' ``, ``'<' `` and ``'>' `` in string *s * to HTML-safe
325325 sequences. Use this if you need to display text that might contain such
326326 characters in HTML. If the optional flag *quote * is true, the quotation mark
327- character (``'"' ``) is also translated; this helps for inclusion in an HTML
328- attribute value, as in ``<A HREF="..."> ``. If the value to be quoted might
329- include single- or double-quote characters, or both, consider using the
330- :func: `quoteattr ` function in the :mod: `xml.sax.saxutils ` module instead.
327+ character (``" ``) is also translated; this helps for inclusion in an HTML
328+ attribute value delimited by double quotes, as in ``<a href="..."> ``. Note
329+ that single quotes are never translated.
330+
331+ If the value to be quoted might include single- or double-quote characters,
332+ or both, consider using the :func: `quoteattr ` function in the
333+ :mod: `xml.sax.saxutils ` module instead.
331334
332335
333336.. _cgi-security :
You can’t perform that action at this time.
0 commit comments