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

Function serializeForScript

packages/core/api/src/oauth-popup.ts:64–68  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

62 * (`<`, `>`, `&`) so an attacker-controlled `error` field can't break out.
63 */
64const serializeForScript = (value: unknown): string =>
65 JSON.stringify(value)
66 .replaceAll("<", "\\u003c")
67 .replaceAll(">", "\\u003e")
68 .replaceAll("&", "\\u0026");
69
70/**
71 * Render the HTML page that the OAuth redirect returns. The page is

Callers 1

popupDocumentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected