Helper methods to escape and unescape HTML entities in a string.
let s = "<One> & Two";let escaped = HTML.escape(s); // "<One> & Two"let unescaped = HTML.unescape(encoded); // "<One> & Two" Copy
let s = "<One> & Two";let escaped = HTML.escape(s); // "<One> & Two"let unescaped = HTML.unescape(encoded); // "<One> & Two"
Static
Escape HTML entities in a string to be HTML safe.
the string to escape
Unescape HTML entities in a string.
the string to unescape
Helper methods to escape and unescape HTML entities in a string.
Example