jQuery: HTML Encode Trick

June 17th, 2009 by jeremychone
$('<div/>').text('This is fun & stuff').html();

Source: debuggable.com

Leave a Reply