Skip to main content

Function: escapeOnce()

escapeOnce(this, left): string | Markup

Return the input string with &, <, >, ", ', and "`" replaced with HTML escape codes while preserving existing escape sequences.

Parameters

this: FilterContext

An object containing a reference to the active render context and any keyword/named arguments.

left: unknown

Any value. Will be coerced to a string if it's not one already.

Returns

string | Markup

The input string with &, <, >, ", ', and "`" replaced with HTML escape codes while preserving existing escape sequences.

Defined in

src/builtin/filters/string.ts:107