I have some Javascript code that communicates with an XML-RPC backend. The XML-RPC returns strings of the form:
function decodeHTMLContent(htmlText) { var txt = document.createElement("span"); txt.innerHTML = htmlText; return txt.innerText; } var result = decodeHTMLContent('One & two & three'); console.log(result);