Skip to content

Commit 8996b9e

Browse files
authored
Merge pull request #14352 from nextcloud/dependabot/npm_and_yarn/bootstrap-4.3.1
[Security] Bump bootstrap from 3.4.1 to 4.3.1
2 parents ec5f420 + 9e3335f commit 8996b9e

File tree

9 files changed

+196
-52
lines changed

9 files changed

+196
-52
lines changed

core/css/tooltip.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
padding: 10px 0;
3737
filter: drop-shadow(0 1px 10px var(--color-box-shadow));
3838
&.in,
39+
&.show,
3940
&.tooltip[aria-hidden='false'] {
4041
visibility: visible;
4142
opacity: 1;
@@ -80,7 +81,7 @@
8081
&.top-left,
8182
&[x-placement^='top'],
8283
&.top-right {
83-
.tooltip-arrow {
84+
.tooltip-arrow, .arrow {
8485
bottom: 0;
8586
border-width: 10px 10px 0;
8687
border-top-color: var(--color-main-background);
@@ -99,7 +100,7 @@
99100
&[x-placement^='bottom'],
100101
&.bottom-left,
101102
&.bottom-right {
102-
.tooltip-arrow {
103+
.tooltip-arrow, .arrow {
103104
top: 0;
104105
border-width: 0 10px 10px;
105106
border-bottom-color: var(--color-main-background);
@@ -129,7 +130,7 @@
129130
border-radius: var(--border-radius);
130131
}
131132

132-
.tooltip-arrow {
133+
.tooltip-arrow, .tooltip .arrow {
133134
position: absolute;
134135
width: 0;
135136
height: 0;

core/js/dist/main.js

Lines changed: 101 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/js/dist/main.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

core/js/tests/html-domparser.js

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* DOMParser HTML extension
3+
* 2012-09-04
4+
*
5+
* By Eli Grey, http://eligrey.com
6+
* Public domain.
7+
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK.
8+
*/
9+
10+
/*! @source https://gist.github.com/1129031 */
11+
/*global document, DOMParser*/
12+
13+
(function(DOMParser) {
14+
"use strict";
15+
16+
var
17+
DOMParser_proto = DOMParser.prototype
18+
, real_parseFromString = DOMParser_proto.parseFromString
19+
;
20+
21+
// Firefox/Opera/IE throw errors on unsupported types
22+
try {
23+
// WebKit returns null on unsupported types
24+
if ((new DOMParser).parseFromString("", "text/html")) {
25+
// text/html parsing is natively supported
26+
return;
27+
}
28+
} catch (ex) {}
29+
30+
DOMParser_proto.parseFromString = function(markup, type) {
31+
if (/^\s*text\/html\s*(?:;|$)/i.test(type)) {
32+
var
33+
doc = document.implementation.createHTMLDocument("")
34+
;
35+
if (markup.toLowerCase().indexOf('<!doctype') > -1) {
36+
doc.documentElement.innerHTML = markup;
37+
}
38+
else {
39+
doc.body.innerHTML = markup;
40+
}
41+
return doc;
42+
} else {
43+
return real_parseFromString.apply(this, arguments);
44+
}
45+
};
46+
}(DOMParser));

core/src/Polyfill/tooltip.js

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* @copyright 2019 Julius Härtl <jus@bitgrid.net>
3+
*
4+
* @author 2019 Julius Härtl <jus@bitgrid.net>
5+
*
6+
* @license GNU AGPL version 3 or any later version
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU Affero General Public License as
10+
* published by the Free Software Foundation, either version 3 of the
11+
* License, or (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU Affero General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU Affero General Public License
19+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
20+
*/
21+
22+
$.prototype.tooltip = (function(tooltip) {
23+
return function(config) {
24+
try {
25+
return tooltip.call(this, config);
26+
} catch (ex) {
27+
if (ex instanceof TypeError && config === 'destroy') {
28+
console.error('Deprecated call $.tooltip(\'destroy\') has been deprecated and should be removed');
29+
return tooltip.call(this, 'dispose');
30+
}
31+
if (ex instanceof TypeError && config === 'fixTitle') {
32+
console.error('Deprecated call $.tooltip(\'fixTitle\') has been deprecated and should be removed');
33+
return tooltip.call(this, '_fixTitle');
34+
}
35+
}
36+
};
37+
})($.prototype.tooltip);

core/src/globals.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ import 'jquery-ui-dist/jquery-ui.theme.css'
3030
// END TODO
3131
import autosize from 'autosize'
3232
import Backbone from 'backbone'
33-
import 'bootstrap/js/tooltip'
33+
import 'bootstrap/js/dist/tooltip'
34+
import './Polyfill/tooltip'
3435
import ClipboardJS from 'clipboard'
3536
import cssVars from 'css-vars-ponyfill'
3637
import dav from 'davclient.js'

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"autosize": "^4.0.2",
2828
"backbone": "^1.3.3",
2929
"blueimp-md5": "^2.10.0",
30-
"bootstrap": "^3.4.1",
30+
"bootstrap": "^4.3.1",
3131
"clipboard": "^2.0.4",
3232
"css-vars-ponyfill": "^1.17.0",
3333
"davclient.js": "git+https://github.com/owncloud/davclient.js.git#0.1.3",

tests/karma.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ module.exports = function(config) {
127127
testCore = true;
128128
}
129129

130+
files.push(corePath + 'tests/html-domparser.js');
130131
files.push('core/js/dist/main.js');
131132
// core mocks
132133
files.push(corePath + 'tests/specHelper.js');

0 commit comments

Comments
 (0)