method legacyCompat.htmlUnescape
legacyCompat.htmlUnescape(s: string): string

Mojo::Util::html_unescape — decodes HTML entities (named: &/</"/etc., and numeric: '/'). No native JS equivalent outside a real DOM (a textarea element's .value trick, unavailable in this Deno sandbox — there's no document), so reimplemented directly against the HTML5 entity table's most common names rather than pulling in a full HTML entity library for what the legacy plugin corpus only ever uses on scraped titles/summaries (a handful of the same few entities in practice).

Parameters

s: string

Return Type

string

Usage

import { legacyCompat } from "plugins/legacy-globals.d.ts";