| | |
| | | + $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'; |
| | |
| | | $show_link = array( |
| | | 'href' => $MESSAGE->get_part_url($attach_prop->mime_id, false), |
| | | 'onclick' => sprintf( |
| | | 'return %s.command(\'load-attachment\',{part:\'%s\', mimetype:\'%s\'},this)', |
| | | 'return %s.command(\'load-attachment\',\'%s\',this)', |
| | | JS_OBJECT_NAME, |
| | | $attach_prop->mime_id, |
| | | $mimetype) |
| | | $attach_prop->mime_id) |
| | | ); |
| | | $out .= html::p('image-attachment', |
| | | html::a($show_link + array('class' => 'image-link', 'style' => sprintf('width:%dpx', $thumbnail_size)), |