In the browser I'd do something like:
export default function htmlDecode(input) {
let doc = new DOMParser().parseFromString(input, 'text/html');
return doc.documentElement.textContent;
}
and escape the opengraph text, but the DOMParser is not available in fastboot, what to do?