diff --git a/emailadmin/inc/class.emailadmin_imapbase.inc.php b/emailadmin/inc/class.emailadmin_imapbase.inc.php index 308152cc37..075a3661c6 100644 --- a/emailadmin/inc/class.emailadmin_imapbase.inc.php +++ b/emailadmin/inc/class.emailadmin_imapbase.inc.php @@ -4006,11 +4006,9 @@ class emailadmin_imapbase /** * clean a message from elements regarded as potentially harmful * param string/reference $_html is the text to be processed - * param boolean $usepurify - obsolet, as we always use htmlLawed - * param boolean $cleanTags - use tidy (if available) to clean/balance tags * return nothing */ - static function getCleanHTML(&$_html, $usepurify = false, $cleanTags=true) + static function getCleanHTML(&$_html) { // remove CRLF and TAB as it is of no use in HTML. // but they matter in
, so we rather don't @@ -4026,66 +4024,34 @@ class emailadmin_imapbase //if (stripos($_html,'![if')!==false && stripos($_html,'')!==false) translation::replaceTagsCompletley($_html,'!\[if','',false); // Strip out stuff in ifs //if (stripos($_html,'!--[if')!==false && stripos($_html,'')!==false) translation::replaceTagsCompletley($_html,'!--\[if','',false); // Strip out stuff in ifs //error_log(__METHOD__.' ('.__LINE__.') '.$_html); - // force the use of kses, as it is still have the edge over purifier with some stuff - $usepurify = true; - if ($usepurify) - { - // we need a customized config, as we may allow external images, $GLOBALS['egw_info']['user']['preferences']['mail']['allowExternalIMGs'] - if (get_magic_quotes_gpc() === 1) $_html = stripslashes($_html); - // Strip out doctype in head, as htmlLawed cannot handle it TODO: Consider extracting it and adding it afterwards - if (stripos($_html,'!doctype')!==false) translation::replaceTagsCompletley($_html,'!doctype'); - if (stripos($_html,'?xml:namespace')!==false) translation::replaceTagsCompletley($_html,'\?xml:namespace','/>',false); - if (stripos($_html,'?xml version')!==false) translation::replaceTagsCompletley($_html,'\?xml version','\?>',false); - if (strpos($_html,'!CURSOR')!==false) translation::replaceTagsCompletley($_html,'!CURSOR'); - // htmLawed filter only the 'body' - //preg_match('`(]*>)(.+?)(