jQuery htmlspecialchars equivalent to encode text as HTML

Found this which said:

$('<div/>').text('This is fun & stuff').html();

Leave a Reply