Found this here where you use snippet from SCriptaculous to escape HTML natively:
function escapeHTML (str)
{
var div = document.createElement('div');
var text = document.createTextNode(str);
div.appendChild(text);
return div.innerHTML;
};
Posted
11-01-2007 4:36 PM
by
Michael Nichols