Skip to content

SudoSOS Back-end API / html/escape / escapeHtml

Function: escapeHtml() ​

ts
function escapeHtml(s): string;

Escape a string for safe interpolation into HTML text or attribute values.

Parameters ​

ParameterTypeDescription
sstringThe raw string

Returns ​

string

The string with & < > " ' replaced by their HTML entities