From 7f3923cf2d3a4e5c9dbe737c5381f92cb3ef0372 Mon Sep 17 00:00:00 2001 From: Romeo Fragomeli Date: Wed, 12 Jan 2022 15:20:14 +0000 Subject: [PATCH] [FIX] base: SCSS don't compile Bootstrap 5 - Fixes the RegEx that insert our internal structure path for some assets like image font... BS5 uses inline SVG and the function `escape-svg` to escape some characters in HTML. But we can't add the path as the image is inline. - Don't include Bootstrap in LESS assets; Since Bootstrap 4 (and also in 5) there are no more LESS files for Bootstrap. So, there is no reason to include the path when we compile LESS assets. Task ID: 2766483 Part-of: odoo/odoo#95450 --- odoo/addons/base/models/assetsbundle.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/odoo/addons/base/models/assetsbundle.py b/odoo/addons/base/models/assetsbundle.py index 0a2f0e36665..cbf73021bc0 100644 --- a/odoo/addons/base/models/assetsbundle.py +++ b/odoo/addons/base/models/assetsbundle.py @@ -876,7 +876,7 @@ class JavascriptAsset(WebAsset): class StylesheetAsset(WebAsset): rx_import = re.compile(r"""@import\s+('|")(?!'|"|/|https?://)""", re.U) - rx_url = re.compile(r"""url\s*\(\s*('|"|)(?!'|"|/|https?://|data:)""", re.U) + rx_url = re.compile(r"""(?