diff options
Diffstat (limited to 'vendor/twbs/bootstrap/js/dist/util/sanitizer.js')
-rw-r--r-- | vendor/twbs/bootstrap/js/dist/util/sanitizer.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/vendor/twbs/bootstrap/js/dist/util/sanitizer.js b/vendor/twbs/bootstrap/js/dist/util/sanitizer.js index 3e1a3014b..af693f0ef 100644 --- a/vendor/twbs/bootstrap/js/dist/util/sanitizer.js +++ b/vendor/twbs/bootstrap/js/dist/util/sanitizer.js @@ -1,6 +1,6 @@ /*! - * Bootstrap sanitizer.js v5.3.0-alpha1 (https://getbootstrap.com/) - * Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) + * Bootstrap sanitizer.js v5.3.0-alpha3 (https://getbootstrap.com/) + * Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) */ (function (global, factory) { @@ -11,13 +11,12 @@ /** * -------------------------------------------------------------------------- - * Bootstrap (v5.3.0-alpha1): util/sanitizer.js + * Bootstrap util/sanitizer.js * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) * -------------------------------------------------------------------------- */ const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']); - const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i; /** * A pattern that recognizes a commonly useful subset of URLs that are safe. @@ -44,6 +43,9 @@ // Check if a regular expression validates the attribute. return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName)); }; + + // js-docs-start allow-list + 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], @@ -77,6 +79,8 @@ u: [], ul: [] }; + // js-docs-end allow-list + function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) { if (!unsafeHtml.length) { return unsafeHtml; |