MCPcopy Index your code
hub / github.com/simstudioai/sim / decodeXmlEntities

Function decodeXmlEntities

apps/sim/connectors/s3/s3.ts:349–356  ·  view source on GitHub ↗

* Decodes XML entities found in S3 response text values. `&amp;` is decoded * last so sequences like `&amp;lt;` resolve to `&lt;` rather than `<`.

(value: string)

Source from the content-addressed store, hash-verified

347 * last so sequences like `&amp;lt;` resolve to `&lt;` rather than `<`.
348 */
349function decodeXmlEntities(value: string): string {
350 return value
351 .replace(/&lt;/g, '<')
352 .replace(/&gt;/g, '>')
353 .replace(/&quot;/g, '"')
354 .replace(/&apos;/g, "'")
355 .replace(/&amp;/g, '&')
356}
357
358/**
359 * Normalizes an ETag from either a ListObjectsV2 XML `<ETag>` element or a

Callers 1

extractTagFunction · 0.85

Calls 1

replaceMethod · 0.65

Tested by

no test coverage detected