metajack / strophejs

The Strophe.js repository has moved to https://github.com/strophe/strophejs
http://strophe.im/strophejs
MIT License
810 stars 160 forks source link

CDATA not sent #81

Open icallarlo opened 12 years ago

icallarlo commented 12 years ago

cdata is not sent even if the nodeType is set numerically to what should match strophe's internal definition of a cdata node.

-A

icallarlo commented 12 years ago

The fix we implemented is as follows:

after function xmlTextNode

     xmlCdataNode: function (text)
{
    return Strophe.xmlGenerator().createCDATASection(text);
},

after t: function

    cdata: function (text)
{
    var child = Strophe.xmlCdataNode(text);
    this.node.appendChild(child);
    return this;
 }