From b40d83751ba880b707730eabbb2730283477b2d8 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 15 May 2015 14:03:25 +0000 Subject: [PATCH] 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 --- emailadmin/inc/class.emailadmin_imapbase.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/emailadmin/inc/class.emailadmin_imapbase.inc.php b/emailadmin/inc/class.emailadmin_imapbase.inc.php index 4d9dd8e491..7865fd5fb3 100644 --- a/emailadmin/inc/class.emailadmin_imapbase.inc.php +++ b/emailadmin/inc/class.emailadmin_imapbase.inc.php @@ -112,7 +112,7 @@ class emailadmin_imapbase 'tidy'=>0, 'elements' => "* -script", '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", ); @@ -4834,11 +4834,11 @@ class emailadmin_imapbase strtolower($singleBodyPart['charSet']) ); $ct = 0; - - if (stripos($singleBodyPart['body'],'(.+)#isU', $singleBodyPart['body'], $newStyle=array()); + $newStyle=array(); + if (stripos($singleBodyPart['body'],'(.+)#isU', $singleBodyPart['body'], $newStyle); if ($ct>0) { - //error_log(__METHOD__.' ('.__LINE__.') '.array2string($newStyle[0])); + //error_log(__METHOD__.' ('.__LINE__.') '.'#'.$ct.'#'.array2string($newStyle)); $style2buffer = implode('',$newStyle[0]); } if ($style2buffer && strtoupper(self::$displayCharset) == 'UTF-8') @@ -5711,7 +5711,7 @@ class emailadmin_imapbase * @param string &$err error-message 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();