1 parent a0ffc1d commit 9d00b6dCopy full SHA for 9d00b6d
1 file changed
__tests__/sanitize.test.ts
@@ -400,4 +400,13 @@ b {background: red;}</style>`);
400
),
401
).toBe(`<style></style>`);
402
});
403
+
404
+ // https://github.com/mat-sz/lettersanitizer/pull/10
405
+ // https://github.com/mat-sz/lettersanitizer/security/advisories/GHSA-hhw2-373g-hx77
406
+ it("doesn't crash with certain markups", () => {
407
+ const depth = 25;
408
+ const html =
409
+ '<article>'.repeat(depth) + 'Hello, world.' + '</article>'.repeat(depth);
410
+ expect(() => sanitize(html)).not.toThrow();
411
+ });
412
0 commit comments