escapeHtml
function@lpm.dev/neo.markdown@lpm.dev/neo.markdown/sanitized
function escapeHtml(html: string): string
Escape HTML entities to prevent XSS
Parameters
html
stringHTML string to escapeReturns
stringEscaped HTML stringExample
escape('<script>alert("XSS")</script>')
// => '<script>alert("XSS")</script>'