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 <rep...@bugs.python.org>
<http://bugs.python.org/issue27429>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to