UNPKG

951 BTypeScriptView Raw
1/**
2 * Encodes all characters in the input using HTML entities. This includes
3 * characters that are valid ASCII characters in HTML documents, such as `#`.
4 *
5 * To get a more compact output, consider using the `encodeNonAsciiHTML`
6 * function, which will only encode characters that are not valid in HTML
7 * documents, as well as non-ASCII characters.
8 *
9 * If a character has no equivalent entity, a numeric hexadecimal reference
10 * (eg. `ü`) will be used.
11 */
12export declare function encodeHTML(input: string): string;
13/**
14 * Encodes all non-ASCII characters, as well as characters not valid in HTML
15 * documents using HTML entities. This function will not encode characters that
16 * are valid in HTML documents, such as `#`.
17 *
18 * If a character has no equivalent entity, a numeric hexadecimal reference
19 * (eg. `ü`) will be used.
20 */
21export declare function encodeNonAsciiHTML(input: string): string;
22//# sourceMappingURL=encode.d.ts.map
\No newline at end of file