]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Add a callout for the sanitizer in popovers and tooltips (#32272)
authorPatrick H. Lauke <redux@splintered.co.uk>
Mon, 7 Dec 2020 16:57:33 +0000 (16:57 +0000)
committerGitHub <noreply@github.com>
Mon, 7 Dec 2020 16:57:33 +0000 (18:57 +0200)
* Add a callout for the sanitizer in popovers and tooltips

* Add second reference to sanitizer in the options

Co-authored-by: XhmikosR <xhmikosr@gmail.com>
site/content/docs/5.0/components/popovers.md
site/content/docs/5.0/components/tooltips.md
site/layouts/partials/callout-info-sanitizer.md [new file with mode: 0644]

index fb0f92f4a906b6e4037a12175a5afbbd51214839..41b482d0316eae68f1b34036b63f3c1970bbbd68 100644 (file)
@@ -21,6 +21,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 >}}
@@ -275,7 +279,7 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
       <td><code>sanitize</code></td>
       <td>boolean</td>
       <td><code>true</code></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><code>allowList</code></td>
index e2a45c3edd69938c5449bf0e228e3e91db4135c9..6f02ac58178519b40b6eed5892d2d056fa721019 100644 (file)
@@ -20,6 +20,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 >}}
@@ -274,7 +278,7 @@ Note that for security reasons the `sanitize`, `sanitizeFn`, and `allowList` opt
       <td><code>sanitize</code></td>
       <td>boolean</td>
       <td><code>true</code></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><code>allowList</code></td>
diff --git a/site/layouts/partials/callout-info-sanitizer.md b/site/layouts/partials/callout-info-sanitizer.md
new file mode 100644 (file)
index 0000000..ee0eda4
--- /dev/null
@@ -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.