I am looking for a javascript version of PHP html_entity_decode . I found this:
function html_entity_decode(str){
var tarea=document.createElement('textarea');
tarea.innerHTML = str; return tarea.value;
tarea.parentNode.removeChild(tarea);
}
However, I can’t use this because I need to write this code for the Facebook FBML / FBJS canvas application and they turned off innerHTML and something similar (crazy, I know).
Is there any other way to do this that doesn't resort to inserting a string into an element and pulling it back? Be sure to use only functions that are allowed in FBJS
source
share