diff options
| author | Patrick H. Lauke <[email protected]> | 2020-12-07 16:57:33 +0000 |
|---|---|---|
| committer | XhmikosR <[email protected]> | 2021-02-17 06:54:38 +0200 |
| commit | 210cb72872f03ce8d6cf6450f0ac8b6935a83aba (patch) | |
| tree | 665110fd55cdc1f6caae5189b583afed5285b54a | |
| parent | 6487ba72f59e88d84f1c75f9d7cfcb27bf880bc3 (diff) | |
| download | bootstrap-210cb72872f03ce8d6cf6450f0ac8b6935a83aba.tar.xz bootstrap-210cb72872f03ce8d6cf6450f0ac8b6935a83aba.zip | |
Add a callout for the sanitizer in popovers and tooltips (#32272)
* Add a callout for the sanitizer in popovers and tooltips
* Add second reference to sanitizer in the options
Co-authored-by: XhmikosR <[email protected]>
| -rw-r--r-- | site/content/docs/4.6/components/popovers.md | 6 | ||||
| -rw-r--r-- | site/content/docs/4.6/components/tooltips.md | 6 | ||||
| -rw-r--r-- | site/layouts/partials/callout-info-sanitizer.md | 1 |
3 files changed, 11 insertions, 2 deletions
diff --git a/site/content/docs/4.6/components/popovers.md b/site/content/docs/4.6/components/popovers.md index 872c35498..6b1234415 100644 --- a/site/content/docs/4.6/components/popovers.md +++ b/site/content/docs/4.6/components/popovers.md @@ -23,6 +23,10 @@ Things to know when using the popover plugin: - Popovers can be triggered thanks to an element inside a shadow DOM. {{< callout info >}} +{{< partial "callout-info-sanitizer.md" >}} +{{< /callout >}} + +{{< callout info >}} {{< partial "callout-info-prefersreducedmotion.md" >}} {{< /callout >}} @@ -268,7 +272,7 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti <td>sanitize</td> <td>boolean</td> <td>true</td> - <td>Enable or disable the sanitization. If activated <code>'template'</code>, <code>'content'</code> and <code>'title'</code> options will be sanitized.</td> + <td>Enable or disable the sanitization. If activated <code>'template'</code>, <code>'content'</code> and <code>'title'</code> options will be sanitized. See the <a href="{{< docsref "/getting-started/javascript#sanitizer" >}}">sanitizer section in our JavaScript documentation</a>.</td> </tr> <tr> <td>whiteList</td> diff --git a/site/content/docs/4.6/components/tooltips.md b/site/content/docs/4.6/components/tooltips.md index 665342794..6abebaea8 100644 --- a/site/content/docs/4.6/components/tooltips.md +++ b/site/content/docs/4.6/components/tooltips.md @@ -22,6 +22,10 @@ Things to know when using the tooltip plugin: - Tooltips can be triggered thanks to an element inside a shadow DOM. {{< callout info >}} +{{< partial "callout-info-sanitizer.md" >}} +{{< /callout >}} + +{{< callout info >}} {{< partial "callout-info-prefersreducedmotion.md" >}} {{< /callout >}} @@ -269,7 +273,7 @@ Note that for security reasons the `sanitize`, `sanitizeFn` and `whiteList` opti <td>sanitize</td> <td>boolean</td> <td>true</td> - <td>Enable or disable the sanitization. If activated <code>'template'</code> and <code>'title'</code> options will be sanitized.</td> + <td>Enable or disable the sanitization. If activated <code>'template'</code> and <code>'title'</code> options will be sanitized. See the <a href="{{< docsref "/getting-started/javascript#sanitizer" >}}">sanitizer section in our JavaScript documentation</a>.</td> </tr> <tr> <td>whiteList</td> diff --git a/site/layouts/partials/callout-info-sanitizer.md b/site/layouts/partials/callout-info-sanitizer.md new file mode 100644 index 000000000..ee0eda48e --- /dev/null +++ b/site/layouts/partials/callout-info-sanitizer.md @@ -0,0 +1 @@ +By default, this component uses the built-in content sanitizer, which strips out any HTML elements that are not explicitly allowed. See the [sanitizer section in our JavaScript documentation](/docs/{{ .Site.Params.docs_version }}/getting-started/javascript/#sanitizer) for more details. |
