MCPcopy Create free account
hub / github.com/anomalyco/opencode / escapeHtml

Function escapeHtml

packages/opencode/src/util/html.ts:1–8  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

1export function escapeHtml(value: string) {
2 return value
3 .replaceAll("&", "&")
4 .replaceAll("<", "&lt;")
5 .replaceAll(">", "&gt;")
6 .replaceAll('"', "&quot;")
7 .replaceAll("'", "&#39;")
8}

Callers 2

html.test.tsFile · 0.90
fmtFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected