There's a bug in XML1's XML_EscapeChars (actually it's
within HTML_EscapeChars) that causes XML not to be
escaped correctly.
Basically, if you want to send a message whose body is:
<text>This car belongs to Jim &amp; Alice</text>
the body should be escaped so that it becomes:
&lt;text&gt;This car belongs to Jim &amp;amp;
Alice&lt;text&gt;
This way when it gets to the other side and is
unescaped, it again becomes:
<text>This car belongs to Jim &amp; Alice</text>
What I'm actually seeing is:
&lt;text>This car belongs to Jim &amp; Alice&lt;/text>
which of course isn't right after unescaping it. Looking
at the code, I don't see why the '>' is not getting
escaped. The '&' should be simply escaped by
changing it to &amp; but the HTML_EscapeChars code
is not doing that - it's way too complicated.
If anybody has a fix for this, you can send me email at
johnhanna@crd.com
Thanks,
John