Skip to content

Commit 9b4bb7f

Browse files
committed
fix(web): lock mermaid themeCSS against diagram directives
1 parent 9b933cc commit 9b4bb7f

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎apps/web/src/components/chat/MermaidDiagram.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ async function renderMermaid(
7777
startOnLoad: false,
7878
securityLevel: "strict",
7979
suppressErrorRendering: true,
80-
// HTML labels are mounted while Mermaid lays them out, before sanitizing,
81-
// so diagram directives must not turn them back on.
80+
// HTML labels and theme CSS are mounted while Mermaid lays the diagram
81+
// out, before sanitizing, so diagram directives must not set them.
8282
secure: [
8383
"secure",
8484
"securityLevel",
@@ -87,6 +87,7 @@ async function renderMermaid(
8787
"suppressErrorRendering",
8888
"maxEdges",
8989
"htmlLabels",
90+
"themeCSS",
9091
],
9192
htmlLabels: false,
9293
flowchart: { htmlLabels: false },

0 commit comments

Comments
 (0)