From a324b22d1e7dc6d6952f8fbbe5696fc3e93c077e Mon Sep 17 00:00:00 2001 From: Olivier Dony Date: Thu, 16 Jun 2016 11:51:15 +0200 Subject: [PATCH] [FIX] mass_mailing: avoid breaking template layouts by stripping classes/data-attributes/style Rev. c9e38cae9f88bb61fd4468ad12e3e3200a4498ac made the html sanitizer stricter, and it will not badly break any attempt at composing a good-looking mail template. It will also strip all data-* attributes due to the default `strict` mode, so any theme/snippets used in the template will be dropped/crippled after saving. mass-mailing templates are strictly meant for composing outbound messages, and never displayed directly in users' Inbox or published on the website. So there does not seem to be any strict necessity to sanitize them. --- addons/mass_mailing/models/mass_mailing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/mass_mailing/models/mass_mailing.py b/addons/mass_mailing/models/mass_mailing.py index 293ef38433a..6c92e116689 100644 --- a/addons/mass_mailing/models/mass_mailing.py +++ b/addons/mass_mailing/models/mass_mailing.py @@ -478,7 +478,7 @@ class MassMailing(osv.Model): 'create_date': fields.datetime('Creation Date'), 'sent_date': fields.datetime('Sent Date', oldname='date', copy=False), 'schedule_date': fields.datetime('Schedule in the Future'), - 'body_html': fields.html('Body', translate=True), + 'body_html': fields.html('Body', translate=True, sanitize=False), 'attachment_ids': fields.many2many( 'ir.attachment', 'mass_mailing_ir_attachments_rel', 'mass_mailing_id', 'attachment_id', 'Attachments'