I have a task to create messages in a specific format by using the following code:
$msg({to: 'user', from: 'me', type: 'chat'}).c("body").t('some data');
This code generates the message structure as follows:
<message to='user' from='me' type='chat' xmlns='jabber:client'>
<body>some data</body>
</message>
However, I actually need the message to be formatted like this:
<message to='user' from='me' type='chat' xmlns='jabber:client'>
<body><![CDATA[some data]]></body>
</message>
My question is, does strophejs
offer a solution for this or do I need to handle the CDATA formatting myself? Can XMPP support sending messages with CDATA?