Skip to content
Snippets Groups Projects
Commit 3051d1dd authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[MERGE] forward port branch 9.0 up to 34f567dd

parents 6e1b660f 34f567dd
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment