Knowledge Base: HTML code is displayed in Jabber messages

Because Jabber uses XML as it's data format, invalid XML in a message would result in your message not being delivered. To protect against this, we check each message to see if it's valid XML and entity encode it if it is not. This can cause any HTML you include in a message to be visible to the recipient of your message.

For instance, if you send a message that is <b>Foo</b> we'll deliver as is, since that's a valid XML fragment. If you send Bert & Ernie we see the bare ampersand and encode the message, delivering this as Bert &amp; Ernie. Jabber clients will decode the HTML and display it as Bert & Ernie.

If you see your HTML code appear in the IM client, you have a stray bare XML character somewhere in the message or an unclosed HTML tag. Because we can't determine the original meaning of your message and decide which characters should be encoded and which should not, we encode the whole message. Make sure your HTML tags are all closed and XML entity encode your strings and you'll be good.

XML reserves 5 characters for internal use. These are the five characters you'll need to encode to prevent us from doing it for you: & < > " ' (ampersand, both angle brackets, and single and double quotes). Encode them as their HTML character entity (&amp; &lt; &gt; &quot; &apos;) to make your strings valid XML.

Other networks like MSN don't require messages to be valid XML, and thus no encoding is necessary. We will deliver those messages exactly as you send them.