Closed nborko closed 12 years ago
If an element contains escaped XML in a text node, then copyElement will double escape the text at this point:
el = Strophe.xmlTextNode(elem.nodeValue);
A possible fix is to pass an optional flag to Strophe.xmlTextNode, such as the following:
xmlTextNode: function (text, isEscaped) { if (! isEscaped) { //ensure text is escaped text = Strophe.xmlescape(text); } ... }
And thus the call in copyElement would be:
el = Strophe.xmlTextNode(elem.nodeValue, true);
fixed in pull request 59.
If an element contains escaped XML in a text node, then copyElement will double escape the text at this point:
el = Strophe.xmlTextNode(elem.nodeValue);
A possible fix is to pass an optional flag to Strophe.xmlTextNode, such as the following:
xmlTextNode: function (text, isEscaped) { if (! isEscaped) { //ensure text is escaped text = Strophe.xmlescape(text); } ... }
And thus the call in copyElement would be:
el = Strophe.xmlTextNode(elem.nodeValue, true);