سؤال

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;

هل كانت مفيدة؟

المحلول

Possible duplicate:

Strophe character encoding issue

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top