diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index 4c569fe50c1..d8b0f61f868 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -145,7 +145,7 @@ class email_template(osv.osv): # - img src -> check URL # - a href -> check URL for node in root.iter(): - if node.tag == 'a': + if node.tag == 'a' and node.get('href'): node.set('href', _process_link(node.get('href'))) elif node.tag == 'img' and not node.get('src', 'data').startswith('data'): node.set('src', _process_link(node.get('src')))