Andrew Urquhart’s Miscellany : Scripts : HTML Entity Encoder / Decoder
This piece of code decodes all numeric entities in a string:
function EntitiesToText(strEncodedText) {
return strEncodedText.replace(/(&#(\\d+));/ig, String.fromCharCode("$1"));
}