function unescape
unescape(str: string,options?: Partial<UnescapeOptions>): stringUnescapes HTML entities in text.
Examples
Example 1
Example 1
import { unescape } from "@std/html/entities"; // Default options (only handles &<>'" and numeric entities) unescape("<>'&AA"); // "<>'&AA" unescape("þð"); // "þð" // Using the full named entity list from the HTML spec (~47K un-minified) import entityList from "@std/html/named_entity_list.json" with { type: "json" }; unescape("þð", { entityList }); // "þð"
Parameters
str: stringoptional
options: Partial<UnescapeOptions>