/ Published in: jQuery
Found at the source link - stealing and indexing :)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$('<div/>').text('This is fun & stuff').html(); // evaluates to "This is fun & stuff"
URL: http://debuggable.com/posts/encode-html-entities-with-jquery:480f4dd6-13cc-4ce9-8071-4710cbdd56cb