[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
This commit is contained in:
Priyanka Kakadiya
2019-05-09 14:17:05 +00:00
committed by qsm-odoo
parent 1121f01196
commit ee94decd30
+5 -1
View File
@@ -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;
});