diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-03-16 18:18:33 +0000 |
commit | f64a639bcfa1fc2bc89ca7db268f594306edfd7c (patch) | |
tree | a2c3c2ebcc3b45e596949db485d6ed18ffaacfa1 /app/assets/javascripts/commons | |
parent | bfbc3e0d6583ea1a91f627528bedc3d65ba4b10f (diff) | |
download | gitlab-ce-f64a639bcfa1fc2bc89ca7db268f594306edfd7c.tar.gz |
Add latest changes from gitlab-org/gitlab@13-10-stable-eev13.10.0-rc40
Diffstat (limited to 'app/assets/javascripts/commons')
-rw-r--r-- | app/assets/javascripts/commons/bootstrap.js | 67 | ||||
-rw-r--r-- | app/assets/javascripts/commons/vue.js | 2 |
2 files changed, 2 insertions, 67 deletions
diff --git a/app/assets/javascripts/commons/bootstrap.js b/app/assets/javascripts/commons/bootstrap.js index f750c62103e..e5e23f2fb5e 100644 --- a/app/assets/javascripts/commons/bootstrap.js +++ b/app/assets/javascripts/commons/bootstrap.js @@ -6,8 +6,6 @@ import 'bootstrap/js/dist/button'; import 'bootstrap/js/dist/collapse'; import 'bootstrap/js/dist/modal'; import 'bootstrap/js/dist/dropdown'; -import 'bootstrap/js/dist/popover'; -import 'bootstrap/js/dist/tooltip'; import 'bootstrap/js/dist/tab'; // custom jQuery functions @@ -19,68 +17,3 @@ $.fn.extend({ return $(this).prop('disabled', false).removeClass('disabled'); }, }); - -/* - Starting with bootstrap 4.3.1, bootstrap sanitizes html used for tooltips / popovers. - This extends the default whitelists with more elements / attributes: - https://getbootstrap.com/docs/4.3/getting-started/javascript/#sanitizer - */ -const whitelist = $.fn.tooltip.Constructor.Default.whiteList; - -const inputAttributes = ['value', 'type']; - -const dataAttributes = [ - 'data-toggle', - 'data-placement', - 'data-container', - 'data-title', - 'data-class', - 'data-clipboard-text', - 'data-placement', -]; - -// Whitelisting data attributes -whitelist['*'] = [ - ...whitelist['*'], - ...dataAttributes, - 'title', - 'width height', - 'abbr', - 'datetime', - 'name', - 'width', - 'height', -]; - -// Whitelist missing elements: -whitelist.label = ['for']; -whitelist.button = [...inputAttributes]; -whitelist.input = [...inputAttributes]; - -whitelist.tt = []; -whitelist.samp = []; -whitelist.kbd = []; -whitelist.var = []; -whitelist.dfn = []; -whitelist.cite = []; -whitelist.big = []; -whitelist.address = []; -whitelist.dl = []; -whitelist.dt = []; -whitelist.dd = []; -whitelist.abbr = []; -whitelist.acronym = []; -whitelist.blockquote = []; -whitelist.del = []; -whitelist.ins = []; -whitelist['gl-emoji'] = [ - 'data-name', - 'data-unicode-version', - 'data-fallback-src', - 'data-fallback-sprite-class', -]; - -// Whitelisting SVG tags and attributes -whitelist.svg = ['viewBox']; -whitelist.use = ['xlink:href']; -whitelist.path = ['d']; diff --git a/app/assets/javascripts/commons/vue.js b/app/assets/javascripts/commons/vue.js index 5b5a1507d38..23647d99656 100644 --- a/app/assets/javascripts/commons/vue.js +++ b/app/assets/javascripts/commons/vue.js @@ -6,3 +6,5 @@ if (process.env.NODE_ENV !== 'production') { } Vue.use(GlFeatureFlagsPlugin); + +Vue.config.ignoredElements = ['gl-emoji']; |