From 0ccd95b19159534050618a45b5d0709e22fc92a6 Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Mon, 24 Jun 2024 18:34:45 +0200 Subject: [PATCH] Replace octal escape characters with their replacements --- src/components/ha-ansi-to-html.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ha-ansi-to-html.ts b/src/components/ha-ansi-to-html.ts index c28fff8b055d..6ba5cd851d36 100644 --- a/src/components/ha-ansi-to-html.ts +++ b/src/components/ha-ansi-to-html.ts @@ -90,7 +90,7 @@ class HaAnsiToHtml extends LitElement { private _parseTextToColoredPre(text) { const pre = document.createElement("pre"); - const re = /\033(?:\[(.*?)[@-~]|\].*?(?:\007|\033\\))/g; + const re = /\x1b(?:\[(.*?)[@-~]|\].*?(?:\x07|\x1b\\))/g; let i = 0; const state: State = {