MCPcopy Create free account
hub / github.com/Forward-Future/loopy / escapeJsonForHtmlScript

Function escapeJsonForHtmlScript

loop-library/scripts/html-script-utils.mjs:1–5  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

1export function escapeJsonForHtmlScript(value) {
2 return String(value).replace(/<\/script/gi, (match) =>
3 match.replace("/", "\\/"),
4 );
5}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected