Pergunta

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;

Foi útil?

Solução

Possible duplicate:

Strophe character encoding issue

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top