Message49377
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).
|
|
Date |
User |
Action |
Args |
2007-08-23 15:45:28 | admin | link | issue1411695 messages |
2007-08-23 15:45:28 | admin | create | |
|