From: Patrick H. Lauke Date: Mon, 7 Dec 2020 16:57:33 +0000 (+0000) Subject: Add a callout for the sanitizer in popovers and tooltips (#32272) X-Git-Tag: v4.6.1~77 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=210cb72872f03ce8d6cf6450f0ac8b6935a83aba;p=thirdparty%2Fbootstrap.git 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 --- diff --git a/site/content/docs/4.6/components/popovers.md b/site/content/docs/4.6/components/popovers.md index 872c35498b..6b12344159 100644 --- a/site/content/docs/4.6/components/popovers.md +++ b/site/content/docs/4.6/components/popovers.md @@ -22,6 +22,10 @@ Things to know when using the popover plugin: - Popovers must be hidden before their corresponding elements have been removed from the DOM. - 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 sanitize boolean true - Enable or disable the sanitization. If activated 'template', 'content' and 'title' options will be sanitized. + Enable or disable the sanitization. If activated 'template', 'content' and 'title' options will be sanitized. See the }}">sanitizer section in our JavaScript documentation. whiteList diff --git a/site/content/docs/4.6/components/tooltips.md b/site/content/docs/4.6/components/tooltips.md index 6653427942..6abebaea83 100644 --- a/site/content/docs/4.6/components/tooltips.md +++ b/site/content/docs/4.6/components/tooltips.md @@ -21,6 +21,10 @@ Things to know when using the tooltip plugin: - Tooltips must be hidden before their corresponding elements have been removed from the DOM. - 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 sanitize boolean true - Enable or disable the sanitization. If activated 'template' and 'title' options will be sanitized. + Enable or disable the sanitization. If activated 'template' and 'title' options will be sanitized. See the }}">sanitizer section in our JavaScript documentation. whiteList diff --git a/site/layouts/partials/callout-info-sanitizer.md b/site/layouts/partials/callout-info-sanitizer.md new file mode 100644 index 0000000000..ee0eda48e5 --- /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.