Skip to content
Permalink
Browse files Browse the repository at this point in the history
SECURITY: render errors as plain text (#14)
  • Loading branch information
jjaffeux committed Jan 4, 2023
1 parent 589d216 commit c10bc4a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -54,7 +54,7 @@ async function applyMermaid(element, key = "composer") {
);
}
} catch (e) {
mermaid.innerHTML = `<span class="mermaid-error">${e?.str || e}</span>`;
mermaid.innerText = e?.text || e;
} finally {
mermaid.dataset.processed = true;
mermaid.querySelector(".spinner")?.remove();
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"author": "joffreyjaffeux",
"license": "MIT",
"version": "1.0.0",
"version": "1.1.0",
"repository": "https://github.com/discourse/discourse-mermaid-theme-component",
"devDependencies": {
"eslint-config-discourse": "^1.1.8"
Expand Down

0 comments on commit c10bc4a

Please sign in to comment.