diff options
| author | Christophe Simonis <chs@odoo.com> | 2018-05-24 16:55:28 +0200 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2018-05-24 16:55:28 +0200 |
| commit | 3051d1dd2fee0c9d711a3f0380d967fa3f95983a (patch) | |
| tree | 7265a946232b67b255e939203d54e3eebf2e0bf9 | |
| parent | 6e1b660f9c76a412dcd78d7f7de593ae318c00bd (diff) | |
| parent | 34f567dd397a016e526c3923024ee1cf9234ca5d (diff) | |
[MERGE] forward port branch 9.0 up to 34f567dd397
| -rw-r--r-- | addons/mass_mailing/models/mail_mail.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/mass_mailing/models/mail_mail.py b/addons/mass_mailing/models/mail_mail.py index f2f6ffd7592..de7ca9b2cfa 100644 --- a/addons/mass_mailing/models/mail_mail.py +++ b/addons/mass_mailing/models/mail_mail.py @@ -92,9 +92,9 @@ class MailMail(models.Model): emails = tools.email_split(res.get('email_to')[0]) email_to = emails and emails[0] or False unsubscribe_url = self._get_unsubscribe_url(email_to) - regex_link_to_replace = re.escape(base_url) + '(/[a-z]{2}_[A-Z]{2})?' + '/unsubscribe_from_list' + link_to_replace = base_url+'/unsubscribe_from_list' if link_to_replace in res['body']: - res['body'] = res['body'].replace(regex_link_to_replace, unsubscribe_url if unsubscribe_url else '#') + res['body'] = res['body'].replace(link_to_replace, unsubscribe_url if unsubscribe_url else '#') return res @api.multi |
