[FIX] mass_mailing: properly convert base64 images
The function that converts inline images to urls returned the modified html as a byte string. As a result, the Mail Debug tab showed a hexadecimal string rather than rendered html. This makes sure the string is encoded in unicode instead, so the format of the string coming out of the function is the same as it was coming in. closes odoo/odoo#84942 X-original-commit: b4094ed004a59512d70913f9cc41de8df894296e Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
@@ -1208,6 +1208,6 @@ class MassMailing(models.Model):
|
||||
modified = True
|
||||
|
||||
if modified:
|
||||
return lxml.html.tostring(root)
|
||||
return lxml.html.tostring(root, encoding='unicode')
|
||||
|
||||
return body_html
|
||||
|
||||
Reference in New Issue
Block a user