Aleksander Machniak
2013-03-14 542f15bfece569ba3d07f57339aca22e535027dd
Enriched content should be also converted to text if html is disabled
2 files modified
8 ■■■■ changed files
program/steps/mail/compose.inc 3 ●●●●● patch | view | raw | blame | history
program/steps/mail/func.inc 5 ●●●● patch | view | raw | blame | history
program/steps/mail/compose.inc
@@ -675,9 +675,6 @@
            $txt = new rcube_html2text($body, false, true, $len);
            $body = $txt->get_text();
        }
        else if ($part->ctype_secondary == 'enriched') {
            $body = rcube_enriched::to_html($body);
        }
        else {
            if ($part->ctype_secondary == 'plain' && $part->ctype_parameters['format'] == 'flowed') {
                $body = rcube_mime::unfold_flowed($body);
program/steps/mail/func.inc
@@ -707,7 +707,10 @@
        + $p + array('safe' => false, 'plain' => false, 'inline_html' => true));
  // convert html to text/plain
  if ($data['type'] == 'html' && $data['plain']) {
  if ($data['plain'] && ($data['type'] == 'html' || $data['type'] == 'enriched')) {
    if ($data['type'] == 'enriched') {
      $data['body'] = rcube_enriched::to_html($data['body']);
    }
    $txt = new rcube_html2text($data['body'], false, true);
    $body = $txt->get_text();
    $part->ctype_secondary = 'plain';