summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2016-06-16 11:51:15 +0200
committerOlivier Dony <odo@openerp.com>2016-06-16 12:47:45 +0200
commita324b22d1e7dc6d6952f8fbbe5696fc3e93c077e (patch)
treec790ccb108233db1dac650fd71ec55c1b5699d0f
parent50136a1404d17aec7f1c1adf1af4897de074ccda (diff)
[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.
-rw-r--r--addons/mass_mailing/models/mass_mailing.py2
1 files changed, 1 insertions, 1 deletions
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'