From 225389ab6c7a32c2ccf7625d333a2f9773565307 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 7 Jan 2020 22:46:28 +0200 Subject: [PATCH 01/20] sanitizer.js: Add srcset in the allowed attributes (#29968) --- js/src/tools/sanitizer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/src/tools/sanitizer.js b/js/src/tools/sanitizer.js index 797159bcc07e..0e83bde477eb 100644 --- a/js/src/tools/sanitizer.js +++ b/js/src/tools/sanitizer.js @@ -37,7 +37,7 @@ export const DefaultWhitelist = { h5: [], h6: [], i: [], - img: ['src', 'alt', 'title', 'width', 'height'], + img: ['src', 'srcset', 'alt', 'title', 'width', 'height'], li: [], ol: [], p: [], From 8731ad946da585dc627f75ab28d08829d95e0df9 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Mon, 13 Jan 2020 17:49:36 +0200 Subject: [PATCH 02/20] javascript.md: Add `srcset` in sanitizer docs (#30007) --- site/docs/4.4/getting-started/javascript.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/docs/4.4/getting-started/javascript.md b/site/docs/4.4/getting-started/javascript.md index a509bd4826df..058737f91c48 100644 --- a/site/docs/4.4/getting-started/javascript.md +++ b/site/docs/4.4/getting-started/javascript.md @@ -167,7 +167,7 @@ var DefaultWhitelist = { h5: [], h6: [], i: [], - img: ['src', 'alt', 'title', 'width', 'height'], + img: ['src', 'srcset', 'alt', 'title', 'width', 'height'], li: [], ol: [], p: [], From ef121d4499b7a468f82d98fa23f698bfd1394de8 Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Tue, 7 Jan 2020 22:07:51 +0200 Subject: [PATCH 03/20] Use regex.test() when we want to check for a Boolean. (#29969) --- build/vnu-jar.js | 2 +- js/src/tools/sanitizer.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build/vnu-jar.js b/build/vnu-jar.js index eb1fbc4b29a1..ebd027adcf26 100644 --- a/build/vnu-jar.js +++ b/build/vnu-jar.js @@ -18,7 +18,7 @@ childProcess.exec('java -version', (error, stdout, stderr) => { return } - const is32bitJava = !stderr.match(/64-Bit/) + const is32bitJava = !/64-Bit/.test(stderr) // vnu-jar accepts multiple ignores joined with a `|`. // Also note that the ignores are regular expressions. diff --git a/js/src/tools/sanitizer.js b/js/src/tools/sanitizer.js index 0e83bde477eb..f108c66d5acb 100644 --- a/js/src/tools/sanitizer.js +++ b/js/src/tools/sanitizer.js @@ -71,7 +71,7 @@ function allowedAttribute(attr, allowedAttributeList) { if (allowedAttributeList.indexOf(attrName) !== -1) { if (uriAttrs.indexOf(attrName) !== -1) { - return Boolean(attr.nodeValue.match(SAFE_URL_PATTERN) || attr.nodeValue.match(DATA_URL_PATTERN)) + return SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue) } return true @@ -80,8 +80,8 @@ function allowedAttribute(attr, allowedAttributeList) { const regExp = allowedAttributeList.filter((attrRegex) => attrRegex instanceof RegExp) // Check if a regular expression validates the attribute. - for (let i = 0, l = regExp.length; i < l; i++) { - if (attrName.match(regExp[i])) { + for (let i = 0, len = regExp.length; i < len; i++) { + if (regExp[i].test(attrName)) { return true } } From 050d5b66d2d8b42265d65f5d0f3f5699d250eccf Mon Sep 17 00:00:00 2001 From: jorimvanhove Date: Thu, 23 Jan 2020 16:30:31 +0100 Subject: [PATCH 04/20] IE auto-size input-group to column (#30043) --- scss/_input-group.scss | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scss/_input-group.scss b/scss/_input-group.scss index bf69ddb41de8..cad8ea367a82 100644 --- a/scss/_input-group.scss +++ b/scss/_input-group.scss @@ -16,7 +16,8 @@ > .custom-select, > .custom-file { position: relative; // For focus state's z-index - flex: 1 1 0%; + flex: 1 1 auto; + width: 1%; min-width: 0; // https://stackoverflow.com/questions/36247140/why-dont-flex-items-shrink-past-content-size margin-bottom: 0; From 4c581edcfa712b8c23a5291c6545c9a47d04c25f Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Thu, 23 Jan 2020 17:18:07 +0100 Subject: [PATCH 05/20] Backport #29325. (#30074) `.text-break` fix --- scss/utilities/_text.scss | 3 +-- site/docs/4.4/utilities/text.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scss/utilities/_text.scss b/scss/utilities/_text.scss index 5d0f1c845f8d..d2b2a22ed8f6 100644 --- a/scss/utilities/_text.scss +++ b/scss/utilities/_text.scss @@ -63,8 +63,7 @@ .text-decoration-none { text-decoration: none !important; } .text-break { - word-break: break-word !important; // IE & < Edge 18 - overflow-wrap: break-word !important; + word-wrap: break-word !important; } // Reset diff --git a/site/docs/4.4/utilities/text.md b/site/docs/4.4/utilities/text.md index d25564a186dc..a9be539a2150 100644 --- a/site/docs/4.4/utilities/text.md +++ b/site/docs/4.4/utilities/text.md @@ -68,7 +68,7 @@ For longer content, you can add a `.text-truncate` class to truncate the text wi ## Word break -Prevent long strings of text from breaking your components' layout by using `.text-break` to set `overflow-wrap: break-word` (and `word-break: break-word` for IE & Edge compatibility). +Prevent long strings of text from breaking your components' layout by using `.text-break` to set `word-wrap: break-word`. {% capture example %}

mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm

From 07028617cd5efa274c0affb2eb6cda455a61068a Mon Sep 17 00:00:00 2001 From: Jens Luyten Date: Sat, 25 Jan 2020 10:15:06 +0100 Subject: [PATCH 06/20] Prevent grid with default cols from breaking when large pre was present (#30049) --- scss/mixins/_grid-framework.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/scss/mixins/_grid-framework.scss b/scss/mixins/_grid-framework.scss index 8e291f7ae0dc..efe51f8f0cc8 100644 --- a/scss/mixins/_grid-framework.scss +++ b/scss/mixins/_grid-framework.scss @@ -31,6 +31,7 @@ .col#{$infix} { flex-basis: 0; flex-grow: 1; + min-width: 0; // See https://github.com/twbs/bootstrap/issues/25410 max-width: 100%; } From 65f9a3e7c701b530389d10714d775fc100229628 Mon Sep 17 00:00:00 2001 From: Jesse Mandel Date: Mon, 10 Feb 2020 01:20:28 -0800 Subject: [PATCH 07/20] Updated nuspec content files and icon (#30148) * #30045 - Update nuspec for updated content type * Update iconUrl (deprecated) to icon Co-authored-by: XhmikosR --- nuget/bootstrap.nuspec | 17 +++++++++++------ nuget/bootstrap.png | Bin 0 -> 1684 bytes nuget/bootstrap.sass.nuspec | 17 +++++++++++------ 3 files changed, 22 insertions(+), 12 deletions(-) create mode 100644 nuget/bootstrap.png diff --git a/nuget/bootstrap.nuspec b/nuget/bootstrap.nuspec index 36d717bb38fd..142f077e4a2c 100644 --- a/nuget/bootstrap.nuspec +++ b/nuget/bootstrap.nuspec @@ -2,16 +2,17 @@ bootstrap - 4.4.1 + + 4 Bootstrap CSS The Bootstrap Authors, Twitter Inc. bootstrap The most popular front-end framework for developing responsive, mobile first projects on the web. https://blog.getbootstrap.com/ - Bootstrap framework in CSS. Includes fonts and JavaScript + Bootstrap framework in CSS. Includes JavaScript en-us https://getbootstrap.com/ - https://getbootstrap.com/docs/4.4/assets/img/favicons/apple-touch-icon.png + bootstrap.png LICENSE.txt Copyright 2017-2020 false @@ -20,16 +21,20 @@ css mobile-first responsive front-end framework web + + + + - - - + + + diff --git a/nuget/bootstrap.png b/nuget/bootstrap.png new file mode 100644 index 0000000000000000000000000000000000000000..d746a8fbb28f49d7ad1ec362e1146bb35dbe6002 GIT binary patch literal 1684 zcmZ8ieKgbiAKy&KFAv>Y_r~p-Usqk-ZlvxlVY56Wr#!B0DdJ~h7>k>lZ26)z96y$) zs5^}1N~9>y?MsMj>lO-0cN>{DW0;wF=ziDj{&U~w{ds?0@7H;~-sil}`JD4f^Y(Nz z&^OhG!C(gN$6S1&8_*m*1XL9Q<}wVX#q>UL(iLi<2snBHhXFk8FP?Uw;tm5o&hdU2 z0EdeAu><@LUB=ndu$XuPnufKf6EK%?Xgbaz0gq0=q3C!AI>CXCN7EooK+*6H2{<$j z4*`@$009D|ff5Z>8YI(bJ|)3H12nD1`rP>FMNx}-c}1;W32;q5do;Q3x6b7A zte|687ZpoNg({iC8sLpx2+Hm29Qx&KPJiFqqKsNrR$YK=QgtaP5zm(8H3lEQ=7+gL zBNdLm8b9aBcsKICw!EW;4bI9IsOJh=9`rTV^r)7WRZHq+mAaVusN}}uP%p;(+~SqU zTO{A~)VR{?aqJj>W^BNXwtC)^dOr6NA8dI3wE0C>YyYz+1MJ)e`HUi+TJCowaYj0S zzr3AzBDDt`eD(Yt<#e`SR4jZe7LHAc-c3yiB=3dNNs*KmUL>B7O-;xiS9NCtl{3@x ziR9Zr^siBb%$tn+(;wtA$y|Co=K-e!E1;vG7wLMz*Aoka|7VlI<}be7vh}O4zqj1I z=f}MPfkD9$k>sdoO8jLSJu{1Wqm*4%&Z+qASx@ipeLVj2q2ZA?qm$yP4-)CLY(cT8 zTqoldG8haIrz{eza4`@ zIs=6|+-_ev>QY$FyqmH$$Asl2ztz<8iUSxX*;IZ<)^%){beMW^CCyMDeoB3 zm4hDK2QeU8L*MH5{HY60aE!cdAcui?%i36>x zq5ZrLy>`~B&vP?}7jeJZZf=kPt>^QlPb+6|? zdJU&3?vYk_h{n(+%f$R!y7E@M&;N&YYXfr+!QfqNnvtGdvhvgUE;Qhk5vye^Z?tTI z!Lt~#CdP86r9B*ej=id$@G+k-ibZ$XK=R?qSPjkAcnMn$N}E)zhWM HDJc0bqN-Gx literal 0 HcmV?d00001 diff --git a/nuget/bootstrap.sass.nuspec b/nuget/bootstrap.sass.nuspec index cd281931ff84..c7fa2794e1c6 100644 --- a/nuget/bootstrap.sass.nuspec +++ b/nuget/bootstrap.sass.nuspec @@ -2,16 +2,17 @@ bootstrap.sass - 4.4.1 + + 4 Bootstrap Sass The Bootstrap Authors, Twitter Inc. bootstrap The most popular front-end framework for developing responsive, mobile first projects on the web. https://blog.getbootstrap.com/ - Bootstrap framework in Sass. Includes fonts and JavaScript + Bootstrap framework in Sass. Includes JavaScript en-us https://getbootstrap.com/ - https://getbootstrap.com/docs/4.4/assets/img/favicons/apple-touch-icon.png + bootstrap.png LICENSE.txt Copyright 2017-2020 false @@ -20,16 +21,20 @@ css sass mobile-first responsive front-end framework web + + + + - - - + + + From 816debc0e8f10de291f314b31fab4d7236144502 Mon Sep 17 00:00:00 2001 From: Giovanni Mendoza Date: Fri, 10 Jan 2020 11:06:12 +0200 Subject: [PATCH 08/20] Backport #29886 Close modal with keyboard=true & backdrop=static --- js/src/modal.js | 7 +++-- js/tests/unit/modal.js | 49 +++++++++++++++++++++++++++++++ site/docs/4.4/components/modal.md | 8 ++--- 3 files changed, 58 insertions(+), 6 deletions(-) diff --git a/js/src/modal.js b/js/src/modal.js index ad925f6ff429..faaa8f108386 100644 --- a/js/src/modal.js +++ b/js/src/modal.js @@ -325,9 +325,12 @@ class Modal { } _setEscapeEvent() { - if (this._isShown && this._config.keyboard) { + if (this._isShown) { $(this._element).on(Event.KEYDOWN_DISMISS, (event) => { - if (event.which === ESCAPE_KEYCODE) { + if (this._config.keyboard && event.which === ESCAPE_KEYCODE) { + event.preventDefault() + this.hide() + } else if (!this._config.keyboard && event.which === ESCAPE_KEYCODE) { this._triggerBackdropTransition() } }) diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index b1ddc8512ff5..14cebe84f374 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -855,4 +855,53 @@ $(function () { backdrop: 'static' }) }) + + QUnit.test('should close modal when escape key is pressed with keyboard = true and backdrop is static', function (assert) { + assert.expect(1) + var done = assert.async() + var $modal = $('