diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-03-13 17:37:20 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-03-13 17:37:20 +0100 |
| commit | 65a5ced979821afed0711e662e2fa7f6ba8a67dd (patch) | |
| tree | f5c16b95a1c71700258a74323934045d1c0de07f /odoo/tools | |
| parent | d5c3f360e2ca076c9b0f4debe643ed1df12a2327 (diff) | |
| parent | 777a87cde8fbee8495c95891d5cb2104cf9160e6 (diff) | |
[MERGE] forward port branch saas-14 up to 777a87cde8f
Diffstat (limited to 'odoo/tools')
| -rw-r--r-- | odoo/tools/mail.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/odoo/tools/mail.py b/odoo/tools/mail.py index 328fa81465c..e1a4eeb9c54 100644 --- a/odoo/tools/mail.py +++ b/odoo/tools/mail.py @@ -42,14 +42,22 @@ class _Cleaner(clean.Cleaner): _style_re = re.compile('''([\w-]+)\s*:\s*((?:[^;"']|"[^"]*"|'[^']*')+)''') _style_whitelist = [ - 'font-size', 'font-family', 'background-color', 'color', 'text-align', + 'font-size', 'font-family', 'font-weight', 'background-color', 'color', 'text-align', + 'line-height', 'letter-spacing', 'text-transform', 'text-decoration', 'padding', 'padding-top', 'padding-left', 'padding-bottom', 'padding-right', 'margin', 'margin-top', 'margin-left', 'margin-bottom', 'margin-right' # box model - 'border', 'border-color', 'border-radius', 'height', 'margin', 'padding', 'width', 'max-width', 'min-width', + 'border', 'border-color', 'border-radius', 'border-style', 'height', + 'margin', 'padding', 'width', 'max-width', 'min-width', # tables 'border-collapse', 'border-spacing', 'caption-side', 'empty-cells', 'table-layout'] + _style_whitelist.extend( + ['border-%s-%s' % (position, attribute) + for position in ['top', 'bottom', 'left', 'right'] + for attribute in ('style', 'color', 'width', 'left-radius', 'right-radius')] + ) + strip_classes = False sanitize_style = False @@ -428,7 +436,7 @@ def generate_tracking_message_id(res_id): except NotImplementedError: rnd = random.random() rndstr = ("%.15f" % rnd)[2:] - return "<%.15f.%s-openerp-%s@%s>" % (time.time(), rndstr, res_id, socket.gethostname()) + return "<%s.%.15f-openerp-%s@%s>" % (rndstr, time.time(), res_id, socket.gethostname()) def email_send(email_from, email_to, subject, body, email_cc=None, email_bcc=None, reply_to=False, attachments=None, message_id=None, references=None, openobject_id=False, debug=False, subtype='plain', headers=None, |
