Hy all, i have to work with xml files in jQuery, and jQuery can't work with < > & and other codes, so i found this code on google:
function escapeHtml(text) {
var map = {
'&': '&',
'<': '<',
'>': '>',
};
return text.replace(/[&<>]/g, function(m) {
return map[m];
});
}
its working for me, but now i need to export this file, and it returns with < > as text, is there a way to revert this back?
No comments:
Post a Comment