Here's an alternative if you can't save your file using a Unicode format:
function decodeHTML(str) {
return str.replace(/(\d+);?/g, function() {
return String.fromCharCode(arguments[1])
});
}
However, this requires you to use the numeric representation. In this case →
.