MCPcopy Create free account
hub / github.com/xerrors/Yuxi / escapeHtml

Function escapeHtml

web/src/utils/html.js:1–7  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1export const escapeHtml = (value) =>
2 String(value ?? '')
3 .replaceAll('&', '&')
4 .replaceAll('<', '&lt;')
5 .replaceAll('>', '&gt;')
6 .replaceAll('"', '&quot;')
7 .replaceAll("'", '&#39;')

Callers 4

renderFrontmatterValueFunction · 0.90
renderFrontmatterFieldFunction · 0.90
renderFrontmatterCardFunction · 0.90
renderMarkdownFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected