Skip to content

Commit

Permalink
[FIX] web_editor: adapt color of svg support rgba with space
Browse files Browse the repository at this point in the history
Before this commit, we only support rgba(xxx,yyy,zzz,v.www)
Now we support also rgba(xxx, yyy, zzz, v.www)

How to reproduce:
Edit theme color secondary, chose a color with transparency.
Go to a 404 page and the pinky will be not loaded.

closes odoo#114486

X-original-commit: e418c91
Signed-off-by: Jérémy Kersten <jke@odoo.com>
  • Loading branch information
JKE-be committed Mar 19, 2023
1 parent 32feecc commit 81a875f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/web_editor/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ def _update_svg_colors(self, options, svg):
}
bundle_css = None
regex_hex = r'#[0-9A-F]{6,8}'
regex_rgba = r'rgba?\(\d{1,3},\d{1,3},\d{1,3}(?:,[0-9.]{1,4})?\)'
regex_rgba = r'rgba?\(\d{1,3}, ?\d{1,3}, ?\d{1,3}(?:, ?[0-9.]{1,4})?\)'
for key, value in options.items():
colorMatch = re.match('^c([1-5])$', key)
if colorMatch:
Expand Down

0 comments on commit 81a875f

Please sign in to comment.