Merge pull request #2831 from gwincr11/cg-custom-dompurify-config

Add dompurify config option
This commit is contained in:
Knut Sveidqvist
2022-03-17 18:01:19 +01:00
committed by GitHub
4 changed files with 64 additions and 4 deletions

View File

@@ -15,3 +15,8 @@ You may also reach out to the team via our public Slack chat channels; however,
Keep current with the latest Mermaid releases. We regularly update Mermaid, and these updates may fix security defects discovered in previous versions. Check the Mermaid release notes for security-related updates.
Keep your applications dependencies up to date. Make sure you upgrade your package dependencies to keep the dependencies up to date. Avoid pinning to specific versions for your dependencies and, if you do, make sure you check periodically to see if your dependencies have had security updates, and update the pin accordingly.
## Configuring DomPurify
By default Mermaid uses a baseline [DOMPurify](https://github.com/cure53/DOMPurify) config. It is possible to override the options passed to DOMPurify by adding a `dompurifyConfig` key to the Mermaid options. This could potentially break the output of Mermaid so use this with caution.