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

Function escapeText

packages/core/sdk/src/artifact-preview.ts:279–280  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

277 });
278
279const escapeText = (value: string): string =>
280 decodeEntities(value).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
281
282const escapeAttribute = (value: string): string =>
283 escapeText(value).replace(/"/g, "&quot;").replace(/'/g, "&#39;");

Callers 2

escapeAttributeFunction · 0.85

Calls 2

decodeEntitiesFunction · 0.85
replaceMethod · 0.65

Tested by

no test coverage detected