[New-bugs-announce] [issue12938] html.escape does not mention single quotes (')

zvin report at bugs.python.org
Thu Sep 8 21:00:48 CEST 2011


New submission from zvin <svinartchouk.alexis at free.fr>:

The html.escape docstring says:

"""
Replace special characters "&", "<" and ">" to HTML-safe sequences.
If the optional flag quote is true (the default), the quotation mark
character (") is also translated.
"""

But if you set the optional flag quote to True, this function also escapes single quotes ('). You can see it by comparing _escape_map and _escape_map_full. [http://hg.python.org/cpython/file/cf811943046b/Lib/html/__init__.py]
The docstring needs to be updated.

----------
components: Library (Lib)
messages: 143736
nosy: zvin
priority: normal
severity: normal
status: open
title: html.escape does not mention single quotes (')
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12938>
_______________________________________


More information about the New-bugs-announce mailing list