odoo/odoo#205554

Created by Walid Sahli (wasa)
Merged at a580752fc9170c0d9a9b4685586a7aa794ea41e0

Statuses:

label
odoo-dev:18.0-opw-4558819-fix_image_background_send_email-wasa
head
e1eb0f6527d95b67a4d55c36b2bf52d6bbb52c0c
merged
2 months ago by Security, Florian Vranckx (flvr)
odoo/odoo
18.0 #205554
saas-18.1 #205754
saas-18.2 #205788
saas-18.3
master #205797

[FIX] mail: allow background-image in style whitelist

Problem:
Images used via background-image in Email Marketing disappear upon email delivery. This is due to the CSS sanitization filter removing the background-image property.

Solution:
Add background-image related properties to_style_whitelist:
- background-image
- background-position
- background-size
- background-repeat
- background-origin

Steps to reproduce:
1. Add a "Header" > "Cover" block in an Email Marketing template.
2. Set a background image on the block.
3. Send the email.
4. Observe that the background image does not appear in the received email.

opw-4558819


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr