[XML-SIG] Escaping text in DOM

Christian Scholz ruebe@aachen.heimat.de
Sat, 18 Dec 1999 16:22:11 +0100 (CET)


Hi!

I am just working on my dav implementation and thus using the DOM
implementation for parsing and creating XML request/responses.

I now have a problem with german umlauts. If these are included in
a test string the actual DOM implementation does not escape it and
when I escape it by hand (ü) I get an escaped & (getting
ü). 

I looked at the implementation and found the escape method in xml.utils
which expects an optional list of entities to convert as parameter.
Unfortunately escape() is used without this parameter in core.py of
the DOM implementation.

The question is now what to do about it and how to change it to
make it work. One solution would be maybe to use htmlentitydefs.py
of the standard distribution directly in xml.utils.escape()
Or will that create any problems?

regards,
  Christian