I have some Javascript code that communicates with an XML-RPC backend. The XML-RPC returns strings of the form:
To unescape HTML entities* in JavaScript you can use small library html-escaper: npm install html-escaper
import {unescape} from 'html-escaper';
unescape('escaped string');
Or unescape
function from Lodash or Underscore, if you are using it.
*) please note that these functions don't cover all HTML entities, but only the most common ones, i.e. &
, <
, >
, '
, "
. To unescape all HTML entities you can use he library.