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

Function escapeAttribute

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

Source from the content-addressed store, hash-verified

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;");
284
285/** Attribute values that reference a document-local id, which must be
286 * rewritten in step with the ids themselves. */

Callers 1

sanitizeAttributesFunction · 0.85

Calls 2

escapeTextFunction · 0.85
replaceMethod · 0.65

Tested by

no test coverage detected