[New-bugs-announce] [issue27429] xml.sax.saxutils.escape doesn't escape multiple characters safely

tylerjohnhughes report at bugs.python.org
Thu Jun 30 19:28:04 EDT 2016


New submission from tylerjohnhughes:

The escape function appears to go through the list in multiple passes, replacing characters as it encounters them on each pass, rather than traversing the source string and replacing matches in the entities dict. This results in invalid escape strings if a replacement value contains one of the replacement entities. I've attached a file to reproduce the behavior.

----------
components: XML
files: escapetest.py
messages: 269634
nosy: tylerjohnhughes
priority: normal
severity: normal
status: open
title: xml.sax.saxutils.escape doesn't escape multiple characters safely
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file43594/escapetest.py

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


More information about the New-bugs-announce mailing list