From a8910bcbe4310ab65a3243e5bd7dbc82c99497bc Mon Sep 17 00:00:00 2001 From: Silas Krause Date: Sun, 30 Nov 2025 14:21:39 +0100 Subject: [PATCH] Fix markdown rendering for cached html (#28229) * Render markdown table in wrapper. * Fix markdown styles * Fix formatting * fix rendering for cache --- src/components/ha-markdown-element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ha-markdown-element.ts b/src/components/ha-markdown-element.ts index a2f30f7ff1..ec89e5ff21 100644 --- a/src/components/ha-markdown-element.ts +++ b/src/components/ha-markdown-element.ts @@ -71,7 +71,7 @@ class HaMarkdownElement extends ReactiveElement { if (!this.innerHTML && this.cache) { const key = this._computeCacheKey(); if (markdownCache.has(key)) { - render(markdownCache.get(key)!, this.renderRoot); + render(h(unsafeHTML(markdownCache.get(key))), this.renderRoot); this._resize(); } }