summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/libs/bootstrap.js
diff options
context:
space:
mode:
authorPriyanka Kakadiya <pka@odoo.com>2019-03-20 06:31:46 +0000
committerqsm-odoo <qsm@odoo.com>2019-05-09 14:17:05 +0000
commitee94decd30c4514d5bc410b1652bc6464bb600aa (patch)
treec45fdd7dbad5f119091e1abc80635b89d6f0f935 /addons/web/static/src/js/libs/bootstrap.js
parent1121f011962a689165bdd7d66b985cd586a1554d (diff)
[FIX] web: disable sanitization for bootstrap popover
Since saas-11.3: Bootstrap sanitizer sanitizes html and removes attributes which are not defined in whitelist, here is the documentation link: https://getbootstrap.com/docs/4.3/getting-started/javascript/#sanitizer Restore sanitize=false for bootstrap popover. A scenario where the sanitizer will break a popover: compare 2 products and open Compare popover and try to delete a comparison item from the popover -> item can not be deleted because data-product_product_id has been removed by sanitizer and so the item can not be deleted because deletion logic depends on data-product_product_id. Reference commit: https://github.com/odoo/odoo/commit/36caf5fc16b5a95a0bf37f08f0caf974683b2df6 Closes https://github.com/odoo/odoo/pull/31961 task-1950702
Diffstat (limited to 'addons/web/static/src/js/libs/bootstrap.js')
-rw-r--r--addons/web/static/src/js/libs/bootstrap.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/addons/web/static/src/js/libs/bootstrap.js b/addons/web/static/src/js/libs/bootstrap.js
index 9db99815009..b91728b22d1 100644
--- a/addons/web/static/src/js/libs/bootstrap.js
+++ b/addons/web/static/src/js/libs/bootstrap.js
@@ -6,7 +6,7 @@ odoo.define('web.bootstrap.extensions', function () {
* patching in place.
*/
-/* Bootstrap defaults overwrite */
+/* Bootstrap tooltip defaults overwrite */
$.fn.tooltip.Constructor.Default.placement = 'auto';
$.fn.tooltip.Constructor.Default.fallbackPlacement = ['bottom', 'right', 'left', 'top'];
$.fn.tooltip.Constructor.Default.html = true;
@@ -24,4 +24,8 @@ $.fn.tooltip.Constructor.prototype.show = function () {
return bootstrapShowFunction.call(this);
};
+
+/* Bootstrap popover defaults overwrite */
+$.fn.popover.Constructor.Default.sanitize = false;
+
});