Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/html_parser/src/utils/entities/mod.ts>escapeUTF8

Port of fb55/htmlparser2 for Deno
Latest
function escapeUTF8
import { escapeUTF8 } from "https://deno.land/x/html_parser@v0.1.3/src/utils/entities/mod.ts";

Encodes all characters not valid in XML documents using numeric hexadecimal reference (eg. ü).

Note that the output will be character-set dependent.

Parameters

data: string

String to escape.

Returns

string