diff --git a/src/utils/helpers.js b/src/utils/helpers.js index b0c491b..c335a99 100644 --- a/src/utils/helpers.js +++ b/src/utils/helpers.js @@ -384,6 +384,7 @@ function sanitizeForXml(content) { // Remove invalid XML control characters (0x00-0x1F except 0x09, 0x0A, 0x0D) // Also remove 0x7F (DEL) which is technically invalid in XML 1.0 + // eslint-disable-next-line no-control-regex return content.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g, ''); } diff --git a/tests/unit/api/copy.test.js b/tests/unit/api/copy.test.js index 4138777..13983b4 100644 --- a/tests/unit/api/copy.test.js +++ b/tests/unit/api/copy.test.js @@ -54,7 +54,7 @@ describe('copy()', () => { expect(result.stats).toHaveProperty('totalSize'); expect(result.stats).toHaveProperty('outputSize'); expect(result.stats.totalFiles).toBeGreaterThan(0); - expect(result.stats.duration).toBeGreaterThan(0); + expect(result.stats.duration).toBeGreaterThanOrEqual(0); }); });