bootstrap 5.3.0.alpha3 → 5.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/javascripts/bootstrap/alert.js +2 -1
- data/assets/javascripts/bootstrap/base-component.js +3 -2
- data/assets/javascripts/bootstrap/button.js +2 -1
- data/assets/javascripts/bootstrap/carousel.js +2 -1
- data/assets/javascripts/bootstrap/collapse.js +2 -1
- data/assets/javascripts/bootstrap/dom/data.js +1 -1
- data/assets/javascripts/bootstrap/dom/event-handler.js +2 -1
- data/assets/javascripts/bootstrap/dom/manipulator.js +1 -1
- data/assets/javascripts/bootstrap/dom/selector-engine.js +2 -1
- data/assets/javascripts/bootstrap/dropdown.js +2 -1
- data/assets/javascripts/bootstrap/modal.js +2 -1
- data/assets/javascripts/bootstrap/offcanvas.js +2 -1
- data/assets/javascripts/bootstrap/popover.js +2 -1
- data/assets/javascripts/bootstrap/scrollspy.js +4 -3
- data/assets/javascripts/bootstrap/tab.js +2 -1
- data/assets/javascripts/bootstrap/toast.js +2 -1
- data/assets/javascripts/bootstrap/tooltip.js +2 -1
- data/assets/javascripts/bootstrap/util/backdrop.js +2 -1
- data/assets/javascripts/bootstrap/util/component-functions.js +2 -1
- data/assets/javascripts/bootstrap/util/config.js +2 -1
- data/assets/javascripts/bootstrap/util/focustrap.js +2 -1
- data/assets/javascripts/bootstrap/util/index.js +1 -1
- data/assets/javascripts/bootstrap/util/sanitizer.js +23 -29
- data/assets/javascripts/bootstrap/util/scrollbar.js +2 -1
- data/assets/javascripts/bootstrap/util/swipe.js +2 -1
- data/assets/javascripts/bootstrap/util/template-factory.js +2 -1
- data/assets/javascripts/bootstrap-sprockets.js +11 -11
- data/assets/javascripts/bootstrap.js +49 -32
- data/assets/javascripts/bootstrap.min.js +2 -2
- data/assets/stylesheets/bootstrap/_navbar.scss +2 -1
- data/assets/stylesheets/bootstrap/_reboot.scss +1 -1
- data/assets/stylesheets/bootstrap/_root.scss +2 -6
- data/assets/stylesheets/bootstrap/_tables.scss +17 -10
- data/assets/stylesheets/bootstrap/_variables-dark.scss +1 -1
- data/assets/stylesheets/bootstrap/_variables.scss +2 -2
- data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +1 -0
- data/assets/stylesheets/bootstrap/helpers/_color-bg.scss +0 -2
- data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +8 -10
- data/assets/stylesheets/bootstrap/mixins/_banner.scss +1 -1
- data/lib/bootstrap/version.rb +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1297df4a046b73652d3beb2a4edea3d3964b185320d890661af5f7ea8f420236
|
4
|
+
data.tar.gz: 9552130734b9698ce8cf99a92617e8df11664dc1d2bc24a9c1e306de646a1f48
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4553a9d115f51a7516243cb392aa9c2f3b1e07f75c315f0400dd62772abd37b907ed3d9b40b37dfd42ec8c1bc809ab60ce7528784485374166d61416df882116
|
7
|
+
data.tar.gz: e01e045f2dd4616399a52dcef1037f177a625d7141b424b9b793fbc203e6b8315634296189af57fcbb7ad004fed61193be04d1d1101115df0cd1364351bd42b3
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap alert.js v5.3.0
|
2
|
+
* Bootstrap alert.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap base-component.js v5.3.0
|
2
|
+
* Bootstrap base-component.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,11 +16,12 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
22
23
|
|
23
|
-
const VERSION = '5.3.0
|
24
|
+
const VERSION = '5.3.0';
|
24
25
|
|
25
26
|
/**
|
26
27
|
* Class definition
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap button.js v5.3.0
|
2
|
+
* Bootstrap button.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap carousel.js v5.3.0
|
2
|
+
* Bootstrap carousel.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap collapse.js v5.3.0
|
2
|
+
* Bootstrap collapse.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap data.js v5.3.0
|
2
|
+
* Bootstrap data.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap event-handler.js v5.3.0
|
2
|
+
* Bootstrap event-handler.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap manipulator.js v5.3.0
|
2
|
+
* Bootstrap manipulator.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap selector-engine.js v5.3.0
|
2
|
+
* Bootstrap selector-engine.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -15,6 +15,7 @@
|
|
15
15
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
|
+
|
18
19
|
const getSelector = element => {
|
19
20
|
let selector = element.getAttribute('data-bs-target');
|
20
21
|
if (!selector || selector === '#') {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap dropdown.js v5.3.0
|
2
|
+
* Bootstrap dropdown.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -35,6 +35,7 @@
|
|
35
35
|
* --------------------------------------------------------------------------
|
36
36
|
*/
|
37
37
|
|
38
|
+
|
38
39
|
/**
|
39
40
|
* Constants
|
40
41
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap modal.js v5.3.0
|
2
|
+
* Bootstrap modal.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap offcanvas.js v5.3.0
|
2
|
+
* Bootstrap offcanvas.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap popover.js v5.3.0
|
2
|
+
* Bootstrap popover.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap scrollspy.js v5.3.0
|
2
|
+
* Bootstrap scrollspy.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -194,11 +195,11 @@
|
|
194
195
|
if (!anchor.hash || index_js.isDisabled(anchor)) {
|
195
196
|
continue;
|
196
197
|
}
|
197
|
-
const observableSection = SelectorEngine.findOne(anchor.hash, this._element);
|
198
|
+
const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element);
|
198
199
|
|
199
200
|
// ensure that the observableSection exists & is visible
|
200
201
|
if (index_js.isVisible(observableSection)) {
|
201
|
-
this._targetLinks.set(anchor.hash, anchor);
|
202
|
+
this._targetLinks.set(decodeURI(anchor.hash), anchor);
|
202
203
|
this._observableSections.set(anchor.hash, observableSection);
|
203
204
|
}
|
204
205
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap tab.js v5.3.0
|
2
|
+
* Bootstrap tab.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap toast.js v5.3.0
|
2
|
+
* Bootstrap toast.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap tooltip.js v5.3.0
|
2
|
+
* Bootstrap tooltip.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -35,6 +35,7 @@
|
|
35
35
|
* --------------------------------------------------------------------------
|
36
36
|
*/
|
37
37
|
|
38
|
+
|
38
39
|
/**
|
39
40
|
* Constants
|
40
41
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap backdrop.js v5.3.0
|
2
|
+
* Bootstrap backdrop.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap component-functions.js v5.3.0
|
2
|
+
* Bootstrap component-functions.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -15,6 +15,7 @@
|
|
15
15
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
|
+
|
18
19
|
const enableDismissTrigger = (component, method = 'hide') => {
|
19
20
|
const clickEvent = `click.dismiss${component.EVENT_KEY}`;
|
20
21
|
const name = component.NAME;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap config.js v5.3.0
|
2
|
+
* Bootstrap config.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Class definition
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap focustrap.js v5.3.0
|
2
|
+
* Bootstrap focustrap.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap index.js v5.3.0
|
2
|
+
* Bootstrap index.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap sanitizer.js v5.3.0
|
2
|
+
* Bootstrap sanitizer.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,34 +16,6 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
-
const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
|
20
|
-
|
21
|
-
/**
|
22
|
-
* A pattern that recognizes a commonly useful subset of URLs that are safe.
|
23
|
-
*
|
24
|
-
* Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
25
|
-
*/
|
26
|
-
const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i;
|
27
|
-
|
28
|
-
/**
|
29
|
-
* A pattern that matches safe data URLs. Only matches image, video and audio types.
|
30
|
-
*
|
31
|
-
* Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
|
32
|
-
*/
|
33
|
-
const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i;
|
34
|
-
const allowedAttribute = (attribute, allowedAttributeList) => {
|
35
|
-
const attributeName = attribute.nodeName.toLowerCase();
|
36
|
-
if (allowedAttributeList.includes(attributeName)) {
|
37
|
-
if (uriAttributes.has(attributeName)) {
|
38
|
-
return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue));
|
39
|
-
}
|
40
|
-
return true;
|
41
|
-
}
|
42
|
-
|
43
|
-
// Check if a regular expression validates the attribute.
|
44
|
-
return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
|
45
|
-
};
|
46
|
-
|
47
19
|
// js-docs-start allow-list
|
48
20
|
const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i;
|
49
21
|
const DefaultAllowlist = {
|
@@ -81,6 +53,28 @@
|
|
81
53
|
};
|
82
54
|
// js-docs-end allow-list
|
83
55
|
|
56
|
+
const uriAttributes = new Set(['background', 'cite', 'href', 'itemtype', 'longdesc', 'poster', 'src', 'xlink:href']);
|
57
|
+
|
58
|
+
/**
|
59
|
+
* A pattern that recognizes URLs that are safe wrt. XSS in URL navigation
|
60
|
+
* contexts.
|
61
|
+
*
|
62
|
+
* Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38
|
63
|
+
*/
|
64
|
+
// eslint-disable-next-line unicorn/better-regex
|
65
|
+
const SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i;
|
66
|
+
const allowedAttribute = (attribute, allowedAttributeList) => {
|
67
|
+
const attributeName = attribute.nodeName.toLowerCase();
|
68
|
+
if (allowedAttributeList.includes(attributeName)) {
|
69
|
+
if (uriAttributes.has(attributeName)) {
|
70
|
+
return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue));
|
71
|
+
}
|
72
|
+
return true;
|
73
|
+
}
|
74
|
+
|
75
|
+
// Check if a regular expression validates the attribute.
|
76
|
+
return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp).some(regex => regex.test(attributeName));
|
77
|
+
};
|
84
78
|
function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
|
85
79
|
if (!unsafeHtml.length) {
|
86
80
|
return unsafeHtml;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap scrollbar.js v5.3.0
|
2
|
+
* Bootstrap scrollbar.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap swipe.js v5.3.0
|
2
|
+
* Bootstrap swipe.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* Bootstrap template-factory.js v5.3.0
|
2
|
+
* Bootstrap template-factory.js v5.3.0 (https://getbootstrap.com/)
|
3
3
|
* Copyright 2011-2023 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
|
4
4
|
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
|
5
5
|
*/
|
@@ -16,6 +16,7 @@
|
|
16
16
|
* --------------------------------------------------------------------------
|
17
17
|
*/
|
18
18
|
|
19
|
+
|
19
20
|
/**
|
20
21
|
* Constants
|
21
22
|
*/
|
@@ -1,28 +1,28 @@
|
|
1
1
|
//= require ./bootstrap-global-this-define
|
2
|
+
//= require ./bootstrap/dom/manipulator
|
2
3
|
//= require ./bootstrap/dom/data
|
3
4
|
//= require ./bootstrap/util/index
|
4
5
|
//= require ./bootstrap/dom/event-handler
|
5
|
-
//= require ./bootstrap/dom/manipulator
|
6
6
|
//= require ./bootstrap/util/config
|
7
7
|
//= require ./bootstrap/base-component
|
8
8
|
//= require ./bootstrap/dom/selector-engine
|
9
9
|
//= require ./bootstrap/util/component-functions
|
10
|
-
//= require ./bootstrap/
|
10
|
+
//= require ./bootstrap/toast
|
11
11
|
//= require ./bootstrap/button
|
12
|
+
//= require ./bootstrap/alert
|
13
|
+
//= require ./bootstrap/util/sanitizer
|
14
|
+
//= require ./bootstrap/util/template-factory
|
12
15
|
//= require ./bootstrap/util/swipe
|
13
16
|
//= require ./bootstrap/carousel
|
14
|
-
//= require ./bootstrap/
|
15
|
-
//= require ./bootstrap/dropdown
|
16
|
-
//= require ./bootstrap/util/backdrop
|
17
|
+
//= require ./bootstrap/tooltip
|
17
18
|
//= require ./bootstrap/util/focustrap
|
19
|
+
//= require ./bootstrap/util/backdrop
|
18
20
|
//= require ./bootstrap/util/scrollbar
|
19
|
-
//= require ./bootstrap/modal
|
20
21
|
//= require ./bootstrap/offcanvas
|
21
|
-
//= require ./bootstrap/util/sanitizer
|
22
|
-
//= require ./bootstrap/util/template-factory
|
23
|
-
//= require ./bootstrap/tooltip
|
24
22
|
//= require ./bootstrap/popover
|
25
|
-
//= require ./bootstrap/
|
23
|
+
//= require ./bootstrap/modal
|
26
24
|
//= require ./bootstrap/tab
|
27
|
-
//= require ./bootstrap/
|
25
|
+
//= require ./bootstrap/dropdown
|
26
|
+
//= require ./bootstrap/collapse
|
27
|
+
//= require ./bootstrap/scrollspy
|
28
28
|
//= require ./bootstrap-global-this-undefine
|