diff --git a/dev/Common/Html.js b/dev/Common/Html.js index 268877f61..1b6e9d3cf 100644 --- a/dev/Common/Html.js +++ b/dev/Common/Html.js @@ -103,6 +103,7 @@ export const * @returns {string} */ cleanHtml = (html, oAttachments) => { + let aColor; const debug = false, // Config()->Get('debug', 'enable', false); detectHiddenImages = true, // !!SettingsGet('try_to_detect_hidden_images'), @@ -121,11 +122,7 @@ export const // convert body attributes to CSS tasks = { - link: value => { - if (/^#[a-fA-Z0-9]{3,6}$/.test(value)) { - tpl.content.querySelectorAll('a').forEach(node => node.style.color || (node.style.color = value)) - } - }, + link: value => aColor = value, text: (value, node) => node.style.color = value, topmargin: (value, node) => node.style.marginTop = pInt(value) + 'px', leftmargin: (value, node) => node.style.marginLeft = pInt(value) + 'px', @@ -162,9 +159,11 @@ export const 'colspan', 'rowspan', 'headers' ], disallowedTags = [ - 'HEAD','STYLE','SVG','SCRIPT','TITLE','LINK','BASE','META', + 'STYLE','SVG','SCRIPT','TITLE','LINK','BASE','META', 'INPUT','OUTPUT','SELECT','BUTTON','TEXTAREA', 'BGSOUND','KEYGEN','SOURCE','OBJECT','EMBED','APPLET','IFRAME','FRAME','FRAMESET','VIDEO','AUDIO','AREA','MAP' + // Not supported by