[FIX] web_editor: properly convert image dimensions

Before this commit, the image dimensions were not properly converted
when converting HTML for e-mails.

opw-3144322

closes odoo/odoo#111793

X-original-commit: 1d5c8c9adf18aded19d945cd9b0f72eb9b8bbc72
Signed-off-by: David Monjoie (dmo) <dmo@odoo.com>
This commit is contained in:
Antoine Guenet
2023-02-03 10:35:58 +01:00
parent ded7bb0895
commit 5cb4175e9c
@@ -590,7 +590,7 @@ async function toInline($editable, cssRules, $iframe) {
value = attributeName === 'width' ? _getWidth(image) : _getHeight(image);;
}
image.setAttribute(attributeName, value);
image.style.setProperty(attributeName, image.getAttribute(attributeName));
image.style.setProperty(attributeName, value + 'px');
};
};