Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
225389a
sanitizer.js: Add srcset in the allowed attributes (#29968)
XhmikosR Jan 7, 2020
8731ad9
javascript.md: Add `srcset` in sanitizer docs (#30007)
XhmikosR Jan 13, 2020
ef121d4
Use regex.test() when we want to check for a Boolean. (#29969)
XhmikosR Jan 7, 2020
050d5b6
IE auto-size input-group to column (#30043)
jorimvanhove Jan 23, 2020
4c581ed
Backport #29325. (#30074)
MartijnCuppens Jan 23, 2020
0702861
Prevent grid with default cols from breaking when large pre was prese…
JensLuyten Jan 25, 2020
65f9a3e
Updated nuspec content files and icon (#30148)
supergibbs Feb 10, 2020
816debc
Backport #29886
mendozagioo Jan 10, 2020
8b7a49a
Add ysds to the team page (#30145)
MartijnCuppens Feb 9, 2020
86b14c4
Bump bootstrap.min.js bundle size limit.
XhmikosR Feb 12, 2020
a09fa8d
Avoid border-radius functions return negative values (#30166)
ysds Feb 14, 2020
e0feefc
change-version.js: Remove nuspec files (#30161)
XhmikosR Feb 13, 2020
89da4c0
Added new variable for padding on dropdown header (#29946)
mendozagioo Feb 15, 2020
11a0993
Add Microsoft Edge for MacOS to supported browsers (#29956)
coliff Feb 17, 2020
c7dc3eb
Remove unnecessary reduce motion when `$enable-transition: false` (#3…
ysds Feb 17, 2020
ce158c5
Backport #29971
XhmikosR Feb 17, 2020
04d2b3a
docs(theming): improve headings hierarchy under Sass → Functions (#30…
ffoodd Feb 17, 2020
b59eb6d
.gitattributes: add `.sh` and remove `.rb` files. (#30196)
XhmikosR Feb 17, 2020
028460e
Update devDependencies and gems.
XhmikosR Feb 17, 2020
70dbd9a
Update jekyll-toc to v0.13.1.
XhmikosR Feb 17, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.rb text eol=lf
*.scss text eol=lf
*.sh text eol=lf
*.svg text eol=lf
*.txt text eol=lf
*.xml text eol=lf
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ source 'https://rubygems.org'

group :development, :test do
gem 'jekyll', '~> 3.8.6'
gem 'jekyll-redirect-from', '~> 0.15.0'
gem 'jekyll-redirect-from', '~> 0.16.0'
gem 'jekyll-sitemap', '~> 1.4.0'
gem 'jekyll-toc', '~> 0.11.0'
gem 'jekyll-toc', '~> 0.13.1'
gem 'wdm', '~> 0.1.1', :install_if => Gem.win_platform?
end
23 changes: 12 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ GEM
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
colorator (1.1.0)
concurrent-ruby (1.1.5)
concurrent-ruby (1.1.6)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.7)
eventmachine (1.2.7-x64-mingw32)
ffi (1.11.3)
ffi (1.11.3-x64-mingw32)
ffi (1.12.2)
ffi (1.12.2-x64-mingw32)
forwardable-extended (2.6.0)
http_parser.rb (0.6.0)
i18n (0.9.5)
Expand All @@ -29,13 +29,14 @@ GEM
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-redirect-from (0.15.0)
jekyll-redirect-from (0.16.0)
jekyll (>= 3.3, < 5.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-toc (0.11.0)
jekyll-toc (0.13.1)
jekyll (>= 3.7)
nokogiri (~> 1.9)
jekyll-watch (2.2.1)
listen (~> 3.0)
Expand All @@ -46,17 +47,17 @@ GEM
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_portile2 (2.4.0)
nokogiri (1.10.7)
nokogiri (1.10.8)
mini_portile2 (~> 2.4.0)
nokogiri (1.10.7-x64-mingw32)
nokogiri (1.10.8-x64-mingw32)
mini_portile2 (~> 2.4.0)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (4.0.2)
public_suffix (4.0.3)
rb-fsevent (0.10.3)
rb-inotify (0.10.1)
ffi (~> 1.0)
rouge (3.14.0)
rouge (3.16.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
Expand All @@ -71,9 +72,9 @@ PLATFORMS

DEPENDENCIES
jekyll (~> 3.8.6)
jekyll-redirect-from (~> 0.15.0)
jekyll-redirect-from (~> 0.16.0)
jekyll-sitemap (~> 1.4.0)
jekyll-toc (~> 0.11.0)
jekyll-toc (~> 0.13.1)
wdm (~> 0.1.1)

BUNDLED WITH
Expand Down
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ plugins:
- jekyll-sitemap
- jekyll-toc

redirect_from:
json: false

# Social
title: Bootstrap
description: "The most popular HTML, CSS, and JS library in the world."
Expand Down
1 change: 0 additions & 1 deletion build/change-version.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ function main(args) {
'.js',
'.json',
'.md',
'.nuspec',
'.scss',
'.txt',
'.yml'
Expand Down
2 changes: 1 addition & 1 deletion build/vnu-jar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion bundlesize.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
},
{
"path": "./dist/js/bootstrap.min.js",
"maxSize": "15.5 kB"
"maxSize": "15.75 kB"
}
]
}
7 changes: 5 additions & 2 deletions js/src/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
})
Expand Down
8 changes: 4 additions & 4 deletions js/src/tools/sanitizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [],
Expand Down Expand Up @@ -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
Expand All @@ -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
}
}
Expand Down
49 changes: 49 additions & 0 deletions js/tests/unit/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = $('<div class="modal" data-backdrop="static" data-keyboard="true"><div class="modal-dialog" /></div>').appendTo('#qunit-fixture')

$modal.on('shown.bs.modal', function () {
$modal.trigger($.Event('keydown', {
which: 27
}))

setTimeout(function () {
var modal = $modal.data('bs.modal')

assert.strictEqual(modal._isShown, false)
done()
}, 10)
})
.bootstrapModal({
backdrop: 'static',
keyboard: true
})
})

QUnit.test('should not close modal when escape key is pressed with keyboard = false and backdrop = static', function (assert) {
assert.expect(1)
var done = assert.async()
var $modal = $('<div class="modal" data-backdrop="static" data-keyboard="false"><div class="modal-dialog" /></div>').appendTo('#qunit-fixture')

$modal.on('shown.bs.modal', function () {
$modal.trigger($.Event('keydown', {
which: 27
}))

setTimeout(function () {
var modal = $modal.data('bs.modal')

assert.strictEqual(modal._isShown, true)
done()
}, 10)
})
.on('hidden.bs.modal', function () {
assert.strictEqual(false, true, 'should not hide the modal')
})
.bootstrapModal({
backdrop: 'static',
keyboard: false
})
})
})
17 changes: 11 additions & 6 deletions nuget/bootstrap.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>bootstrap</id>
<version>4.4.1</version>
<!-- pulled from package.json -->
<version>4</version>
<title>Bootstrap CSS</title>
<authors>The Bootstrap Authors, Twitter Inc.</authors>
<owners>bootstrap</owners>
<description>The most popular front-end framework for developing responsive, mobile first projects on the web.</description>
<releaseNotes>https://blog.getbootstrap.com/</releaseNotes>
<summary>Bootstrap framework in CSS. Includes fonts and JavaScript</summary>
<summary>Bootstrap framework in CSS. Includes JavaScript</summary>
<language>en-us</language>
<projectUrl>https://getbootstrap.com/</projectUrl>
<iconUrl>https://getbootstrap.com/docs/4.4/assets/img/favicons/apple-touch-icon.png</iconUrl>
<icon>bootstrap.png</icon>
<license type="file">LICENSE.txt</license>
<copyright>Copyright 2017-2020</copyright>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Expand All @@ -20,16 +21,20 @@
<dependency id="popper.js" version="[1.16.0,2)" />
</dependencies>
<tags>css mobile-first responsive front-end framework web</tags>
<contentFiles>
<files include="**/*" buildAction="Content" />
</contentFiles>
</metadata>
<files>
<file src="LICENSE.txt" target="" />
<file src="nuget\bootstrap.png" target="" />

<file src="dist\css\*.*" target="content\Content" />
<file src="dist\js\bootstrap*.js" target="content\Scripts" />
<file src="dist\js\bootstrap*.js.map" target="content\Scripts" />

<file src="dist\css\*.*" target="contentFiles\Content" />
<file src="dist\js\bootstrap*.js" target="contentFiles\Scripts" />
<file src="dist\js\bootstrap*.js.map" target="contentFiles\Scripts" />
<file src="dist\css\*.*" target="contentFiles\any\any\wwwroot\css" />
<file src="dist\js\bootstrap*.js" target="contentFiles\any\any\wwwroot\js" />
<file src="dist\js\bootstrap*.js.map" target="contentFiles\any\any\wwwroot\js" />
</files>
</package>
Binary file added nuget/bootstrap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 11 additions & 6 deletions nuget/bootstrap.sass.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
<metadata>
<id>bootstrap.sass</id>
<version>4.4.1</version>
<!-- pulled from package.json -->
<version>4</version>
<title>Bootstrap Sass</title>
<authors>The Bootstrap Authors, Twitter Inc.</authors>
<owners>bootstrap</owners>
<description>The most popular front-end framework for developing responsive, mobile first projects on the web.</description>
<releaseNotes>https://blog.getbootstrap.com/</releaseNotes>
<summary>Bootstrap framework in Sass. Includes fonts and JavaScript</summary>
<summary>Bootstrap framework in Sass. Includes JavaScript</summary>
<language>en-us</language>
<projectUrl>https://getbootstrap.com/</projectUrl>
<iconUrl>https://getbootstrap.com/docs/4.4/assets/img/favicons/apple-touch-icon.png</iconUrl>
<icon>bootstrap.png</icon>
<license type="file">LICENSE.txt</license>
<copyright>Copyright 2017-2020</copyright>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
Expand All @@ -20,16 +21,20 @@
<dependency id="popper.js" version="[1.16.0,2)" />
</dependencies>
<tags>css sass mobile-first responsive front-end framework web</tags>
<contentFiles>
<files include="**/*" buildAction="Content" />
</contentFiles>
</metadata>
<files>
<file src="LICENSE.txt" target="" />
<file src="nuget\bootstrap.png" target="" />

<file src="scss\**\*.scss" target="content\Content\bootstrap" />
<file src="dist\js\bootstrap*.js" target="content\Scripts" />
<file src="dist\js\bootstrap*.js.map" target="content\Scripts" />

<file src="scss\**\*.scss" target="contentFiles\Content\bootstrap" />
<file src="dist\js\bootstrap*.js" target="contentFiles\Scripts" />
<file src="dist\js\bootstrap*.js.map" target="contentFiles\Scripts" />
<file src="scss\**\*.scss" target="contentFiles\any\any\wwwroot\scss" />
<file src="dist\js\bootstrap*.js" target="contentFiles\any\any\wwwroot\js" />
<file src="dist\js\bootstrap*.js.map" target="contentFiles\any\any\wwwroot\js" />
</files>
</package>
Loading