entities 9.0.0
enum EncodingMode

Defined in index.ts:21

Encoding strategy used by encode.

Enumeration Members

UTF8 = 0

The output is UTF-8 encoded. Only characters that need escaping within XML will be escaped.

ASCII = 1

The output consists only of ASCII characters. Characters that need escaping within HTML, and characters that aren't ASCII characters will be escaped.

Extensive = 2

Encode all characters that have an equivalent entity, as well as all characters that are not ASCII characters.

Attribute = 3

Encode all characters that have to be escaped in HTML attributes, following https://html.spec.whatwg.org/multipage/parsing.html#escapingString.

Text = 4

Encode all characters that have to be escaped in HTML text, following https://html.spec.whatwg.org/multipage/parsing.html#escapingString.