function escapeHTML (str)
{
var div = document.createElement('div');
var text = document.createTextNode(str);
div.appendChild(text);
return div.innerHTML;
};
{
var div = document.createElement('div');
var text = document.createTextNode(str);
div.appendChild(text);
return div.innerHTML;
};
2 comments:
Nice method! Why re-invent the wheel i guess :)
Thanks - solved a problem for me...
Post a Comment