|
@@ -1518,6 +1518,7 @@ function sq_body2div($attary, $mailbox, $message, $id){
|
|
$divattary = Array('class' => "'bodyclass'");
|
|
$divattary = Array('class' => "'bodyclass'");
|
|
$bgcolor = '#ffffff';
|
|
$bgcolor = '#ffffff';
|
|
$text = '#000000';
|
|
$text = '#000000';
|
|
|
|
+ $has_bgc_stl = $has_txt_stl = false;
|
|
$styledef = '';
|
|
$styledef = '';
|
|
if (is_array($attary) && sizeof($attary) > 0){
|
|
if (is_array($attary) && sizeof($attary) > 0){
|
|
foreach ($attary as $attname=>$attvalue){
|
|
foreach ($attary as $attname=>$attvalue){
|
|
@@ -1530,13 +1531,20 @@ function sq_body2div($attary, $mailbox, $message, $id){
|
|
$styledef .= "background-image: url('$attvalue'); ";
|
|
$styledef .= "background-image: url('$attvalue'); ";
|
|
break;
|
|
break;
|
|
case 'bgcolor':
|
|
case 'bgcolor':
|
|
|
|
+ $has_bgc_stl = true;
|
|
$styledef .= "background-color: $attvalue; ";
|
|
$styledef .= "background-color: $attvalue; ";
|
|
break;
|
|
break;
|
|
case 'text':
|
|
case 'text':
|
|
|
|
+ $has_txt_stl = true;
|
|
$styledef .= "color: $attvalue; ";
|
|
$styledef .= "color: $attvalue; ";
|
|
break;
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // Outlook defines a white bgcolor and no text color. This can lead to
|
|
|
|
+ // white text on a white bg with certain themes.
|
|
|
|
+ if ($has_bgc_stl && !$has_txt_stl) {
|
|
|
|
+ $styledef .= "color: $text; ";
|
|
|
|
+ }
|
|
if (strlen($styledef) > 0){
|
|
if (strlen($styledef) > 0){
|
|
$divattary{"style"} = "\"$styledef\"";
|
|
$divattary{"style"} = "\"$styledef\"";
|
|
}
|
|
}
|