Fix stripped apostrophes when replying in plain text to HTML message (#1488606)
| | |
| | | CHANGELOG Roundcube Webmail |
| | | =========================== |
| | | |
| | | - Fix stripped apostrophes when replying in plain text to HTML message (#1488606) |
| | | - Fix inactive Save search option after advanced search (#1488607) |
| | | - Fix Remove from group option is active for contact search result (#1488608) |
| | | - Disable autocapitalization in login form on iPad/iPhone (#1488609) |
| | |
| | | $text = preg_replace($this->ent_search, $this->ent_replace, $text); |
| | | |
| | | // Replace known html entities |
| | | $text = html_entity_decode($text, ENT_COMPAT, 'UTF-8'); |
| | | $text = html_entity_decode($text, ENT_QUOTES, 'UTF-8'); |
| | | |
| | | // Remove unknown/unhandled entities (this cannot be done in search-and-replace block) |
| | | $text = preg_replace('/&([a-zA-Z0-9]{2,6}|#[0-9]{2,4});/', '', $text); |
| | |
| | | $h2t = new html2text($plugin['body'], false, true, 0); |
| | | $plainTextPart = rc_wordwrap($h2t->get_text(), $LINE_LENGTH, "\r\n"); |
| | | $plainTextPart = wordwrap($plainTextPart, 998, "\r\n", true); |
| | | if (!$plainTextPart) { |
| | | // empty message body breaks attachment handling in drafts |
| | | $plainTextPart = "\r\n"; |
| | | } |
| | | else { |
| | | |
| | | // make sure all line endings are CRLF (#1486712) |
| | | $plainTextPart = preg_replace('/\r?\n/', "\r\n", $plainTextPart); |
| | | } |
| | | |
| | | $plugin = $RCMAIL->plugins->exec_hook('message_outgoing_body', |
| | | array('body' => $plainTextPart, 'type' => 'alternative', 'message' => $MAIL_MIME)); |
| | |
| | | $message_body = rc_wordwrap($message_body, $LINE_LENGTH, "\r\n"); |
| | | |
| | | $message_body = wordwrap($message_body, 998, "\r\n", true); |
| | | if (!strlen($message_body)) { |
| | | // empty message body breaks attachment handling in drafts |
| | | $message_body = "\r\n"; |
| | | } |
| | | |
| | | $MAIL_MIME->setTXTBody($message_body, false, true); |
| | | } |