[issue12938] html.escape does not mention single quotes (')
New submission from zvin : 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 <http://bugs.python.org/issue12938> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12938] html.escape docstring does not mention single quotes (')
Changes by zvin : -- title: html.escape does not mention single quotes (') -> html.escape docstring does not mention single quotes (') ___ Python tracker <http://bugs.python.org/issue12938> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12938] html.escape docstring does not mention single quotes (')
zvin added the comment: Or maybe instead of updating the docstring, we should remove the single quote (') from _escape_map_full. cgi.escape did not escaped the single quotes (') and if you use it now, it says: "PendingDeprecationWarning: cgi.escape is deprecated, use html.escape instead" -- ___ Python tracker <http://bugs.python.org/issue12938> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com