[IMP] mail_debrand: keep the decoration (grey border) where the branding was

when using mail.mail_notification_light as a wrapper
pull/1358/head
Stefan Rijnhart 2024-01-25 13:43:36 +01:00 committed by chien
parent 1234364fab
commit 81732dd2bf
1 changed files with 2 additions and 2 deletions

View File

@ -41,9 +41,9 @@ class MailRenderMixin(models.AbstractModel):
# Remove "Powered by", "using" etc. # Remove "Powered by", "using" etc.
previous = elem.getprevious() previous = elem.getprevious()
if previous is not None: if previous is not None:
previous.tail = "" previous.tail = etree.CDATA(" ")
elif parent.text: elif parent.text:
parent.text = "" parent.text = etree.CDATA(" ")
parent.remove(elem) parent.remove(elem)
value = etree.tostring( value = etree.tostring(
tree, pretty_print=True, method="html", encoding="unicode" tree, pretty_print=True, method="html", encoding="unicode"