diff --git a/addons/web_editor/static/src/js/backend/convert_inline.js b/addons/web_editor/static/src/js/backend/convert_inline.js index 670d72083ea..f501e7fc0c7 100644 --- a/addons/web_editor/static/src/js/backend/convert_inline.js +++ b/addons/web_editor/static/src/js/backend/convert_inline.js @@ -756,6 +756,14 @@ async function toInline($editable, cssRules, $iframe) { // Hide replaced cells on Outlook editable.querySelectorAll('.mso-hide').forEach(_hideForOutlook); + // Replace double quotes in font-family styles with simple quotes (and + // simply remove these styles from images). + editable.querySelectorAll('[style*=font-family]').forEach(n => ( + n.nodeName === 'IMG' + ? n.style.removeProperty('font-family') + : n.setAttribute('style', n.getAttribute('style').replaceAll('"', '\'')) + )); + // Styles were applied inline, we don't need a style element anymore. $editable.find('style').remove();