I have some Javascript code that communicates with an XML-RPC backend. The XML-RPC returns strings of the form:
Chris answer is nice & elegant but it fails if value is undefined. Just simple improvement makes it solid:
function htmlDecode(value) { return (typeof value === 'undefined') ? '' : $('').html(value).text(); }