Ack:- Lunar Media
function escapeHTML (str)
var div = document.createElement(‘div’);
var text = document.createTextNode(str);
Wonderful simple and effective trick using the browsers own automatic Html converter.