Possible Duplicate:
How to escape HTML
How can a string be converted to HTML in JavaScript?
e.g.
var unsafestring = "<oohlook&atme>";
var safestring = magic(unsafestring);
where safestring now equals "<ohhlook&atme>"
I am looking for magic(...).
I am not using JQuery for magic.
So then with
var unsafestring = "<oohlook&atme>";you would usehtmlEntities(unsafestring);