runtime/decoder
Enumerations
'Read the “', Enumerations, '” section'EntityLevel
'Read the “', EntityLevel, '” section'Defined in: studiocms/packages/studiocms/src/runtime/decoder/index.ts:4
The level of entities to support.
Enumeration Members
'Read the “', Enumeration Members, '” section'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.
Interfaces
'Read the “', Interfaces, '” section'DecodingOptions
'Read the “', DecodingOptions, '” section'Defined in: studiocms/packages/studiocms/src/runtime/decoder/index.ts:11
Properties
'Read the “', Properties, '” section'optional level: EntityLevel;
Defined in: studiocms/packages/studiocms/src/runtime/decoder/index.ts:16
The level of entities to support.
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
Functions
'Read the “', Functions, '” section'function decode(input: string, options: | DecodingOptions | EntityLevel): string
Defined in: studiocms/packages/studiocms/src/runtime/decoder/index.ts:37
Decodes a string with entities.
Parameters
'Read the “', Parameters, '” section'string
String to decode.
Decoding options.
string