From 2f4af87bf70bf3839054bdb8a47d6d19d1026c48 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sat, 20 Aug 2022 16:22:48 +0530 Subject: [PATCH] Fix `securityLevel` docs --- docs/Setup.md | 10 +++++----- docs/usage.md | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/Setup.md b/docs/Setup.md index 85070a1e7..7a253e521 100644 --- a/docs/Setup.md +++ b/docs/Setup.md @@ -72,16 +72,16 @@ Theme , the CSS style sheet ## securityLevel -| Parameter | Description | Type | Required | Values | -| ------------- | --------------------------------- | ------ | -------- | ------------------------------- | -| securitylevel | Level of trust for parsed diagram | string | Required | 'strict', 'loose', 'antiscript' | +| Parameter | Description | Type | Required | Values | +| ------------- | --------------------------------- | ------ | -------- | ------------------------- | +| securityLevel | Level of trust for parsed diagram | string | Required | 'sandbox', 'strict', 'loose', 'antiscript' | **Notes**: - **strict**: (**default**) tags in text are encoded, click functionality is disabled - **loose**: tags in text are allowed, click functionality is enabled -- **antiscript**: html tags in text are allowed, (only script element is removed), click - functionality is enabled +- **antiscript**: html tags in text are allowed, (only script element is removed), click functionality is enabled +- **sandbox**: With this security level all rendering takes place in a sandboxed iframe. This prevent any JavaScript running in the context. This may hinder interactive functionality of the diagram like scripts, popups in sequence diagram or links to other tabs/targets etc. ## startOnLoad diff --git a/docs/usage.md b/docs/usage.md index ac126631a..1815f0a36 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -107,7 +107,7 @@ Mermaid can load multiple diagrams, in the same page. | Parameter | Description | Type | Required | Values | | ------------- | --------------------------------- | ------ | -------- | ------------------------- | -| securityLevel | Level of trust for parsed diagram | String | Required | Strict, Loose, antiscript , sandbox| +| securityLevel | Level of trust for parsed diagram | String | Required | 'sandbox', 'strict', 'loose', 'antiscript' | Values: @@ -118,7 +118,7 @@ Values: ```note -This changes the default behaviour of mermaid so that after upgrade to 8.2,unless the `securityLevel` is not changed, tags in flowcharts are encoded as tags and clicking is disabled. +This changes the default behaviour of mermaid so that after upgrade to 8.2, unless the `securityLevel` is not changed, tags in flowcharts are encoded as tags and clicking is disabled. **sandbox** security level is still in the beta version. ```