This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author msandler
Recipients
Date 2006-01-21.20:17:14
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
sax.saxutils.escape -- always escapes <, >, &, even
if entities are provided.  

E.g. 
escape("<abcd>", {'a':'\a'}) would produce

"<\abcd%rt;" instead of "<\abcd>"

While it might be expected behaviour, the documentation
states 

"You can escape other strings of data by passing a
dictionary as the optional entities parameter. The keys
and values must all be strings; each key will be
replaced with its corresponding value. "

and it is not at all obvious that entities specify
_additional_ (to <, >, &) escape strings.

It is also impossible to do custom escapes of <,>,&
using saxutils.escape. 
(while custom escapes of < and > might be never
necessary for XML,  the escape function is general
enough to be of interest in other circumstances).





History
Date User Action Args
2007-08-23 15:45:28adminlinkissue1411695 messages
2007-08-23 15:45:28admincreate