Question

I'm sending message containing < character.

But the message was recieved as &lt; character.

Here's my script:

var message = $msg({to: 'user@domain.com', "type": "chat"}).c('body').t('<a href="#">hshshsh</a>').up().c('active', {xmlns: "xhttp://jabber.org/protocol/chatstates"});         
Gab.connection.send(message);

The message was actually: <a href="#">hshshsh</a>

But it was recieved as: &lt;a href="#"&gt;hshshsh&lt;/a&gt;

What does make the < converted to &lt;

Was it helpful?

Solution

Possible duplicate:

Strophe character encoding issue

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top