allow phone as schema attribute for href in HTMLawed-Config; make merge function static, as this is the way it is used almost always; fix warning in getStyles

This commit is contained in:
Klaus Leithoff 2015-05-15 14:03:25 +00:00
parent b40378574d
commit b40d83751b

View File

@ -112,7 +112,7 @@ class emailadmin_imapbase
'tidy'=>0, 'tidy'=>0,
'elements' => "* -script", 'elements' => "* -script",
'deny_attribute' => 'on*', 'deny_attribute' => 'on*',
'schemes'=>'href: file, ftp, http, https, mailto; src: cid, data, file, ftp, http, https; *:file, http, https, cid, src', 'schemes'=>'href: file, ftp, http, https, mailto, phone; src: cid, data, file, ftp, http, https; *:file, http, https, cid, src',
'hook_tag' =>"hl_email_tag_transform", 'hook_tag' =>"hl_email_tag_transform",
); );
@ -4834,11 +4834,11 @@ class emailadmin_imapbase
strtolower($singleBodyPart['charSet']) strtolower($singleBodyPart['charSet'])
); );
$ct = 0; $ct = 0;
$newStyle=array();
if (stripos($singleBodyPart['body'],'<style')!==false) $ct = preg_match_all('#<style(?:\s.*)?>(.+)</style>#isU', $singleBodyPart['body'], $newStyle=array()); if (stripos($singleBodyPart['body'],'<style')!==false) $ct = preg_match_all('#<style(?:\s.*)?>(.+)</style>#isU', $singleBodyPart['body'], $newStyle);
if ($ct>0) if ($ct>0)
{ {
//error_log(__METHOD__.' ('.__LINE__.') '.array2string($newStyle[0])); //error_log(__METHOD__.' ('.__LINE__.') '.'#'.$ct.'#'.array2string($newStyle));
$style2buffer = implode('',$newStyle[0]); $style2buffer = implode('',$newStyle[0]);
} }
if ($style2buffer && strtoupper(self::$displayCharset) == 'UTF-8') if ($style2buffer && strtoupper(self::$displayCharset) == 'UTF-8')
@ -5711,7 +5711,7 @@ class emailadmin_imapbase
* @param string &$err error-message on error * @param string &$err error-message on error
* @return string/boolean merged content or false on error * @return string/boolean merged content or false on error
*/ */
function merge($content,$ids,$mimetype='') static function merge($content,$ids,$mimetype='')
{ {
$mergeobj = new addressbook_merge(); $mergeobj = new addressbook_merge();