Skip to content

Commit

Permalink
Add a callout for the sanitizer in popovers and tooltips (#32272)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
patrickhlauke and XhmikosR committed Feb 17, 2021
1 parent 6487ba7 commit 210cb72
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 5 additions & 1 deletion site/content/docs/4.6/components/popovers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 >}}
Expand Down Expand Up @@ -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>
Expand Down
6 changes: 5 additions & 1 deletion site/content/docs/4.6/components/tooltips.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 >}}
Expand Down Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions site/layouts/partials/callout-info-sanitizer.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 210cb72

Please sign in to comment.