How do I use jQuery to decode HTML entities in a string?
Suppose you have below String.
Our Deluxe cabins are warm, cozy & comfortable
var str = $("p").text(); // get the text from tag $('p').html(str).text(); // Now,decode html entities in your variable i.e
tag $('p').html(str).text(); // Now,decode html entities in your variable i.e
str and assign back to
tag.
that's it.