aboutsummaryrefslogtreecommitdiff
path: root/site/content/docs/5.3/getting-started/javascript.md
diff options
context:
space:
mode:
authorHannah Issermann <[email protected]>2023-03-27 11:10:25 +0200
committerGitHub <[email protected]>2023-03-27 12:10:25 +0300
commit06f7c3b6c73580cd05b131bdab4d156a864d418c (patch)
tree910759161d3155be5559f1a4d331a0ad40c1674b /site/content/docs/5.3/getting-started/javascript.md
parent31f93e2aff5050877f499faca05dc4341942a40a (diff)
downloadbootstrap-06f7c3b6c73580cd05b131bdab4d156a864d418c.tar.xz
bootstrap-06f7c3b6c73580cd05b131bdab4d156a864d418c.zip
Add js-docs shortcode to ensure consistency between doc and js code (#38316)
Co-authored-by: XhmikosR <[email protected]>
Diffstat (limited to 'site/content/docs/5.3/getting-started/javascript.md')
-rw-r--r--site/content/docs/5.3/getting-started/javascript.md37
1 files changed, 1 insertions, 36 deletions
diff --git a/site/content/docs/5.3/getting-started/javascript.md b/site/content/docs/5.3/getting-started/javascript.md
index 827cd2199..739e9ef63 100644
--- a/site/content/docs/5.3/getting-started/javascript.md
+++ b/site/content/docs/5.3/getting-started/javascript.md
@@ -231,42 +231,7 @@ Tooltips and Popovers use our built-in sanitizer to sanitize options which accep
The default `allowList` value is the following:
-```js
-const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i
-const DefaultAllowlist = {
- // Global attributes allowed on any supplied element below.
- '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],
- a: ['target', 'href', 'title', 'rel'],
- area: [],
- b: [],
- br: [],
- col: [],
- code: [],
- div: [],
- em: [],
- hr: [],
- h1: [],
- h2: [],
- h3: [],
- h4: [],
- h5: [],
- h6: [],
- i: [],
- img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],
- li: [],
- ol: [],
- p: [],
- pre: [],
- s: [],
- small: [],
- span: [],
- sub: [],
- sup: [],
- strong: [],
- u: [],
- ul: []
-}
-```
+{{< js-docs name="allow-list" file="js/src/util/sanitizer.js" >}}
If you want to add new values to this default `allowList` you can do the following: