Fix broken (in 93b0a30c1c8aa29d862b587b31e52bcc344b8d16) text/plain body of a message when using "edit as new"
| | |
| | | $cid_map = rcmail_write_compose_attachments($MESSAGE, $bodyIsHtml); |
| | | } |
| | | |
| | | // clean up html tags - XSS prevention (#1489251) |
| | | // clean up HTML tags - XSS prevention (#1489251) |
| | | if ($bodyIsHtml) { |
| | | $body = rcmail_wash_html($body, array('safe' => 1), $cid_map); |
| | | |
| | | // remove comments (produced by washtml) |
| | | $body = preg_replace('/<!--[^>]+-->/', '', $body); |
| | | |
| | | // replace cid with href in inline images links |
| | | if ($cid_map) { |
| | | if (!empty($cid_map)) { |
| | | $body = str_replace(array_keys($cid_map), array_values($cid_map), $body); |
| | | } |
| | | } |
| | | |
| | | return $body; |
| | | } |