 <p>Some people might suggest a (jQuery) function that creates a temporary <code>div</code>, places the text in there, then gets the content of the <code>div</code>, to decode the string.</p> <p>Although the implementation of it is simple, it is rather unsafe, since you'd pretty much be asking for users to put all kinds of html tags in the string.</p> <p><a href="http://phpjs.org/functions/html_entity_decode/" rel="nofollow">I'd suggest using these functions</a><br> (<a href="http://phpjs.org/functions/get_html_translation_table/" rel="nofollow">Requires a second function</a>)</p> <p>These are safer than the <code>div</code> alternative.</p>