Skip to content

Commit

Permalink
Bug: 14500 Ensure we only use the body of the html part.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrubinsk committed Nov 5, 2016
1 parent 13b8ff2 commit c10fcc9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions framework/Core/lib/Horde/Core/ActiveSync/Mail.php
Expand Up @@ -624,6 +624,19 @@ protected function _msgBody(array $body_data, Horde_Mime_Part $part, $html, $flo
$flowed = new Horde_Text_Flowed($msg, 'UTF-8');
$msg = $flowed->toFlowed(true);
}
} else {
// This filter requires the tidy extenstion.
if (Horde_Util::extensionExists('tidy')) {
return Horde_Text_Filter::filter(
$msg,
'Cleanhtml',
array('body_only' => true)
);
} else {
// If no tidy, use Horde_Dom.
$dom = new Horde_Domhtml($msg, 'UTF-8');
return $dom->returnBody();
}
}

return $msg;
Expand Down

0 comments on commit c10fcc9

Please sign in to comment.