From deb52b4bd6ecfaf82d8a6c7257e86224e3ee637b Mon Sep 17 00:00:00 2001 From: Yannis Burkhalter Date: Thu, 13 Feb 2025 14:38:13 +0100 Subject: [PATCH] [FIX] mail_debrand: Avoid odoo.sh links removal For URLs like my-customer.odoo.com Forward of #1181 Issue: #1375 --- mail_debrand/models/mail_render_mixin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mail_debrand/models/mail_render_mixin.py b/mail_debrand/models/mail_render_mixin.py index 5497828862..de05fc75b6 100644 --- a/mail_debrand/models/mail_render_mixin.py +++ b/mail_debrand/models/mail_render_mixin.py @@ -28,14 +28,14 @@ def remove_href_odoo(self, value, to_keep=None): has_dev_odoo_link = re.search( r"") tree = html.fromstring(value) - odoo_anchors = tree.xpath('//a[contains(@href,"odoo.com")]') + odoo_anchors = tree.xpath('//a[contains(@href,"www.odoo.com")]') for elem in odoo_anchors: parent = elem.getparent() # Remove "Powered by", "using" etc.