MCPcopy
hub / github.com/garrytan/gstack / escapeHtml

Function escapeHtml

design/src/daemon.ts:186–190  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

184}
185
186function escapeHtml(s: string): string {
187 return s.replace(/[&<>"']/g, (c) =>
188 ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", '"': "&quot;", "'": "&#39;" }[c]!),
189 );
190}
191
192// ─── Shutdown ─────────────────────────────────────────────────────
193

Callers 2

handleIndexFunction · 0.70
boardExpiredHtmlFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected