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

x/html_parser/src/utils/entities/encode.ts>encodeXML

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

Encodes all non-ASCII characters, as well as characters not valid in XML documents using XML entities.

If a character has no equivalent entity, a numeric hexadecimal reference (eg. ü) will be used.