MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / escapeHtml

Function escapeHtml

packages/core/api/src/oauth-popup.ts:51–57  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

49// ---------------------------------------------------------------------------
50
51const escapeHtml = (value: string): string =>
52 value
53 .replaceAll("&", "&")
54 .replaceAll("<", "&lt;")
55 .replaceAll(">", "&gt;")
56 .replaceAll('"', "&quot;")
57 .replaceAll("'", "&#39;");
58
59/**
60 * Serialize for embedding inside a `<script>` tag. Escapes the characters

Callers 1

popupDocumentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected