Found this which said:
$('<div/>').text('This is fun & stuff').html();
Found this which said:
$('<div/>').text('This is fun & stuff').html();
Found a handy web-based utility for encoding/escaping text in JavaScript: Text Escaping and Unescaping in JavaScript.