Skip to content

runtime/decoder

Defined in: studiocms/packages/studiocms/src/runtime/decoder/index.ts:4

The level of entities to support.

HTML: 1;

Defined in: studiocms/packages/studiocms/src/runtime/decoder/index.ts:8

Support HTML entities, which are a superset of XML entities.

XML: 0;

Defined in: studiocms/packages/studiocms/src/runtime/decoder/index.ts:6

Support only XML entities.

Defined in: studiocms/packages/studiocms/src/runtime/decoder/index.ts:11

optional level: EntityLevel;

Defined in: studiocms/packages/studiocms/src/runtime/decoder/index.ts:16

The level of entities to support.

EntityLevel.XML

optional mode: DecodingMode;

Defined in: studiocms/packages/studiocms/src/runtime/decoder/index.ts:28

Decoding mode. If Legacy, will support legacy entities not terminated with a semicolon (;).

Always Strict for XML. For HTML, set this to true if you are parsing an attribute value.

The deprecated decodeStrict function defaults this to Strict.

DecodingMode.Legacy

function decode(input: string, options:
| DecodingOptions
| EntityLevel): string

Defined in: studiocms/packages/studiocms/src/runtime/decoder/index.ts:37

Decodes a string with entities.

string

String to decode.

Decoding options.

DecodingOptions | EntityLevel

string