Variable: escapeHtml()

Estimated reading time: less than 1 minute
escapeHtml: (this, value) => string

Escapes a string for safe use as HTML text content. If the value is not a string, it is coerced to one with its own toString() method.

If the Bun runtime is available, this function will be swapped out to Bun.escapeHTML.

Parameters

this

void

value

any

The value to escape.

Returns

string

The escaped string.