Skip to content

Variable: escapeHtml

const escapeHtml: (value) => string = string.escapeHtml

Escape HTML-significant characters (re-exported from shared-core).

Escape the five characters significant in HTML text and double-quoted attribute values (&, <, >, ", ') so an untrusted string can be interpolated into markup without breaking out of its context. & is replaced first so ampersands introduced by the later replacements aren’t double-escaped.

string

string