After some research I found the simple solution to convert HTML characters entities back to regular text using JavaScript. The code is simple and fast.

var decodeEntities = function( s )
	var str, temp = document.createElement('p');
	temp.innerHTML = s;
	str = temp.textContent || temp.innerText;
	temp = null;
	return str;


You can leave a response, or trackback from your own site.

Before you add comment see for rules.

Leave a Reply

Your email address will not be published. Required fields are marked *