diff --git a/addons/mass_mailing/models/mail_mail.py b/addons/mass_mailing/models/mail_mail.py
index 99aca1321a7..679a3d19a88 100644
--- a/addons/mass_mailing/models/mail_mail.py
+++ b/addons/mass_mailing/models/mail_mail.py
@@ -81,8 +81,9 @@ class MailMail(osv.Model):
body = tools.append_content_to_html(base, body, plaintext=False, container_tag='div')
# resolve relative image url to absolute for outlook.com
def _sub_relative2absolute(match):
- return match.group(1) + urlparse.urljoin(domain, match.group(2)) + '"'
- body = re.sub('(]*\ssrc=")(/[^/][^"]+)"', _sub_relative2absolute, body)
+ return match.group(1) + urlparse.urljoin(domain, match.group(2))
+ body = re.sub('(
]*\ssrc=")(/[^/][^"]+)', _sub_relative2absolute, body)
+ body = re.sub(r'(<[^>]+\bstyle="[^"]+\burl\(\'?)(/[^/\'][^\'")]+)', _sub_relative2absolute, body)
# generate tracking URL
if mail.statistics_ids:
diff --git a/addons/website_mail/views/snippets.xml b/addons/website_mail/views/snippets.xml
index 1c75f87243d..00a0806b7e1 100644
--- a/addons/website_mail/views/snippets.xml
+++ b/addons/website_mail/views/snippets.xml
@@ -51,7 +51,7 @@
|
@@ -69,7 +69,7 @@
-
|