bootstrap 5.3.0.alpha3 → 5.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/assets/javascripts/bootstrap/alert.js +2 -1
  4. data/assets/javascripts/bootstrap/base-component.js +3 -2
  5. data/assets/javascripts/bootstrap/button.js +2 -1
  6. data/assets/javascripts/bootstrap/carousel.js +2 -1
  7. data/assets/javascripts/bootstrap/collapse.js +2 -1
  8. data/assets/javascripts/bootstrap/dom/data.js +1 -1
  9. data/assets/javascripts/bootstrap/dom/event-handler.js +2 -1
  10. data/assets/javascripts/bootstrap/dom/manipulator.js +1 -1
  11. data/assets/javascripts/bootstrap/dom/selector-engine.js +2 -1
  12. data/assets/javascripts/bootstrap/dropdown.js +2 -1
  13. data/assets/javascripts/bootstrap/modal.js +2 -1
  14. data/assets/javascripts/bootstrap/offcanvas.js +2 -1
  15. data/assets/javascripts/bootstrap/popover.js +2 -1
  16. data/assets/javascripts/bootstrap/scrollspy.js +4 -3
  17. data/assets/javascripts/bootstrap/tab.js +13 -4
  18. data/assets/javascripts/bootstrap/toast.js +2 -1
  19. data/assets/javascripts/bootstrap/tooltip.js +2 -1
  20. data/assets/javascripts/bootstrap/util/backdrop.js +2 -1
  21. data/assets/javascripts/bootstrap/util/component-functions.js +2 -1
  22. data/assets/javascripts/bootstrap/util/config.js +2 -1
  23. data/assets/javascripts/bootstrap/util/focustrap.js +2 -1
  24. data/assets/javascripts/bootstrap/util/index.js +1 -1
  25. data/assets/javascripts/bootstrap/util/sanitizer.js +23 -29
  26. data/assets/javascripts/bootstrap/util/scrollbar.js +2 -1
  27. data/assets/javascripts/bootstrap/util/swipe.js +2 -1
  28. data/assets/javascripts/bootstrap/util/template-factory.js +2 -1
  29. data/assets/javascripts/bootstrap-sprockets.js +9 -9
  30. data/assets/javascripts/bootstrap.js +60 -35
  31. data/assets/javascripts/bootstrap.min.js +2 -2
  32. data/assets/stylesheets/bootstrap/_nav.scss +2 -14
  33. data/assets/stylesheets/bootstrap/_navbar.scss +2 -1
  34. data/assets/stylesheets/bootstrap/_reboot.scss +5 -5
  35. data/assets/stylesheets/bootstrap/_root.scss +2 -6
  36. data/assets/stylesheets/bootstrap/_tables.scss +17 -10
  37. data/assets/stylesheets/bootstrap/_variables-dark.scss +2 -2
  38. data/assets/stylesheets/bootstrap/_variables.scss +8 -6
  39. data/assets/stylesheets/bootstrap/forms/_floating-labels.scss +3 -1
  40. data/assets/stylesheets/bootstrap/forms/_form-check.scss +1 -1
  41. data/assets/stylesheets/bootstrap/forms/_form-control.scss +1 -1
  42. data/assets/stylesheets/bootstrap/forms/_form-range.scss +3 -3
  43. data/assets/stylesheets/bootstrap/forms/_form-select.scss +1 -1
  44. data/assets/stylesheets/bootstrap/helpers/_color-bg.scss +1 -4
  45. data/assets/stylesheets/bootstrap/helpers/_colored-links.scss +8 -10
  46. data/assets/stylesheets/bootstrap/helpers/_vr.scss +1 -1
  47. data/assets/stylesheets/bootstrap/mixins/_banner.scss +1 -1
  48. data/bootstrap.gemspec +1 -1
  49. data/lib/bootstrap/version.rb +2 -2
  50. metadata +10 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 63aeb656107be9f6dae64d6fd1e369476f743018d86cb5d87b2482d1c493f9d8
4
- data.tar.gz: 5160c42b1ea8333e7a820ccc47561f56ded1aeab950cf186624357b990463ef4
3
+ metadata.gz: 4fd9f8cb7a704fd15eb16fedda143f4baf37f6c9dee896123f917b43745cd7f8
4
+ data.tar.gz: ad04dbdab20c3c2c24fc3def8dc565d93649329a367d2ded1ab9ecdaa36afc76
5
5
  SHA512:
6
- metadata.gz: 2d38c781ff2f4f8115b5c6c7eeeba9f4d7fb7e5ef67f72dded8c9439c1231a970daa32a3ea7202e0aeb1a01d22c998432eb8e4e45a6d9f52bb3afd621ef70957
7
- data.tar.gz: 590237c07a1b7bed950a288c5bdee0c6feb1d54af2c56a2698a35066add2e96bc19168eba260d94fa6c0275a35d3ba840e3955265698220752bd92200ab91bf5
6
+ metadata.gz: 1778455e9a08f322a881f41b1ebc5735bb0b3d8ceba123d31013c786475b018ef2ca5acb2f314aaffb67db0e857ab3f7add44b1689f7df05e77045256b4a2d26
7
+ data.tar.gz: b5af7ae313ea00f05c021dd502627b53df69f6b70d34d1590b2bb1600d5a5fc2366bc7edc7efec7b938d7d120b87f9e66c563515ad4dfbe8666868b32144da99
data/README.md CHANGED
@@ -21,7 +21,7 @@ Please see the appropriate guide for your environment of choice:
21
21
  Add `bootstrap` to your Gemfile:
22
22
 
23
23
  ```ruby
24
- gem 'bootstrap', '~> 5.3.0.alpha3'
24
+ gem 'bootstrap', '~> 5.3.1'
25
25
  ```
26
26
 
27
27
  Ensure that `sprockets-rails` is at least v2.3.2.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap alert.js v5.3.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap alert.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap base-component.js v5.3.1 (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-alpha2';
24
+ const VERSION = '5.3.1';
24
25
 
25
26
  /**
26
27
  * Class definition
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap button.js v5.3.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap button.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap carousel.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap collapse.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap data.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap event-handler.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap manipulator.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap selector-engine.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap dropdown.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap modal.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap offcanvas.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap popover.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap scrollspy.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap tab.js v5.3.1 (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
  */
@@ -34,6 +35,8 @@
34
35
  const ARROW_RIGHT_KEY = 'ArrowRight';
35
36
  const ARROW_UP_KEY = 'ArrowUp';
36
37
  const ARROW_DOWN_KEY = 'ArrowDown';
38
+ const HOME_KEY = 'Home';
39
+ const END_KEY = 'End';
37
40
  const CLASS_NAME_ACTIVE = 'active';
38
41
  const CLASS_NAME_FADE = 'fade';
39
42
  const CLASS_NAME_SHOW = 'show';
@@ -140,13 +143,19 @@
140
143
  this._queueCallback(complete, element, element.classList.contains(CLASS_NAME_FADE));
141
144
  }
142
145
  _keydown(event) {
143
- if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)) {
146
+ if (![ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY, HOME_KEY, END_KEY].includes(event.key)) {
144
147
  return;
145
148
  }
146
149
  event.stopPropagation(); // stopPropagation/preventDefault both added to support up/down keys without scrolling the page
147
150
  event.preventDefault();
148
- const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);
149
- const nextActiveElement = index_js.getNextActiveElement(this._getChildren().filter(element => !index_js.isDisabled(element)), event.target, isNext, true);
151
+ const children = this._getChildren().filter(element => !index_js.isDisabled(element));
152
+ let nextActiveElement;
153
+ if ([HOME_KEY, END_KEY].includes(event.key)) {
154
+ nextActiveElement = children[event.key === HOME_KEY ? 0 : children.length - 1];
155
+ } else {
156
+ const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key);
157
+ nextActiveElement = index_js.getNextActiveElement(children, event.target, isNext, true);
158
+ }
150
159
  if (nextActiveElement) {
151
160
  nextActiveElement.focus({
152
161
  preventScroll: true
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Bootstrap toast.js v5.3.0-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap toast.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap tooltip.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap backdrop.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap component-functions.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap config.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap focustrap.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap index.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap sanitizer.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap scrollbar.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap swipe.js v5.3.1 (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-alpha3 (https://getbootstrap.com/)
2
+ * Bootstrap template-factory.js v5.3.1 (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
  */
@@ -5,24 +5,24 @@
5
5
  //= require ./bootstrap/dom/manipulator
6
6
  //= require ./bootstrap/util/config
7
7
  //= require ./bootstrap/base-component
8
+ //= require ./bootstrap/util/swipe
8
9
  //= require ./bootstrap/dom/selector-engine
9
- //= require ./bootstrap/util/component-functions
10
- //= require ./bootstrap/alert
10
+ //= require ./bootstrap/util/sanitizer
11
+ //= require ./bootstrap/util/template-factory
11
12
  //= require ./bootstrap/button
12
- //= require ./bootstrap/util/swipe
13
- //= require ./bootstrap/carousel
14
13
  //= require ./bootstrap/collapse
15
- //= require ./bootstrap/dropdown
16
14
  //= require ./bootstrap/util/backdrop
15
+ //= require ./bootstrap/dropdown
16
+ //= require ./bootstrap/util/component-functions
17
+ //= require ./bootstrap/alert
17
18
  //= require ./bootstrap/util/focustrap
18
19
  //= require ./bootstrap/util/scrollbar
19
20
  //= require ./bootstrap/modal
21
+ //= require ./bootstrap/carousel
22
+ //= require ./bootstrap/scrollspy
20
23
  //= require ./bootstrap/offcanvas
21
- //= require ./bootstrap/util/sanitizer
22
- //= require ./bootstrap/util/template-factory
23
24
  //= require ./bootstrap/tooltip
24
25
  //= require ./bootstrap/popover
25
- //= require ./bootstrap/scrollspy
26
- //= require ./bootstrap/tab
27
26
  //= require ./bootstrap/toast
27
+ //= require ./bootstrap/tab
28
28
  //= require ./bootstrap-global-this-undefine