Forum Discussion
GauravSharma3
9 years agoQrew Commander
I will try this code.
RobertPratt
9 years agoQrew Member
One thing I did not take into account is the way XML uses the text, The following function was added and each text node was wrapped in the function.
And for clarification on why I have such a round about way is because we have looping relationships on the tables involved and the manager only wanted specific fields copied instead of all of them.
function escapeXml(unsafe) { return unsafe.replace(/[<>&'"]/g, function (c) {
switch (c) {
case '<': return '<';
case '>': return '>';
case '&': return '&';
case '\'': return ''';
case '"': return '"';
}
});
}
And for clarification on why I have such a round about way is because we have looping relationships on the tables involved and the manager only wanted specific fields copied instead of all of them.