MCPcopy Create free account
hub / github.com/cameri/nostream / escapeHtml

Function escapeHtml

src/utils/html.ts:12–12  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

10 * Escape a string for safe interpolation into HTML text or attribute values.
11 */
12export const escapeHtml = (value: string): string => value.replace(/[&<>"']/g, (ch) => HTML_ESCAPES[ch])
13
14/**
15 * Serialize a value for safe embedding inside an inline <script> block.

Callers 6

html.spec.tsFile · 0.90
handleRequestMethod · 0.90
handleRequestMethod · 0.90
rootRequestHandlerFunction · 0.90
getTermsRequestHandlerFunction · 0.90
getPrivacyRequestHandlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected