Function: escapeHtml()
escapeHtml(Defined in: sanitize.ts:157 Escapes special HTML characters in a string to their corresponding HTML entities, preventing direct injection of HTML and JavaScript when rendering untrusted content.text):string
Parameters
text
string
The plain text to escape.
Returns
string
The escaped string safe for HTML rendering.