From 84aef74de096ed39ef65a0c51d4f6939b499d6b9 Mon Sep 17 00:00:00 2001 From: Gert Hengeveld <info@ghengeveld.nl> Date: Fri, 25 Oct 2024 15:34:15 +0200 Subject: [PATCH] Escape XML when converting ANSI to HTML in test errors --- code/addons/test/src/utils.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/code/addons/test/src/utils.ts b/code/addons/test/src/utils.ts index d80d9f4cdbee..6139bd738605 100644 --- a/code/addons/test/src/utils.ts +++ b/code/addons/test/src/utils.ts @@ -28,6 +28,7 @@ export function isJestError(error: unknown) { export function createAnsiToHtmlFilter(theme: StorybookTheme) { return new Filter({ + escapeXML: true, fg: theme.color.defaultText, bg: theme.background.content, });