Changeset 7472893 in github
- Timestamp:
- Dec 6, 2010 6:13:55 AM (2 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 0e11940
- Parents:
- 9e81b55
- Files:
-
- 4 edited
-
CHANGELOG (modified) (1 diff)
-
program/include/main.inc (modified) (2 diffs)
-
program/steps/mail/sendmail.inc (modified) (5 diffs)
-
program/steps/utils/html2text.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
re232acb r7472893 15 15 - Fix copying all messages in a folder copies only messages from current page 16 16 - Improve performance of moving or copying of all messages in a folder 17 - Fix plaintext versions of HTML messages don't contain placeholders for emotions (#1485206) 17 18 18 19 RELEASE 0.5-BETA -
program/include/main.inc
raf3c045e r7472893 1648 1648 1649 1649 /** 1650 * Replaces TinyMCE's emoticon images with plain-text representation 1651 * 1652 * @param string HTML content 1653 * @return string HTML content 1654 */ 1655 function rcmail_replace_emoticons($html) 1656 { 1657 $emoticons = array( 1658 '8-)' => 'smiley-cool', 1659 ':-#' => 'smiley-foot-in-mouth', 1660 ':-*' => 'smiley-kiss', 1661 ':-X' => 'smiley-sealed', 1662 ':-P' => 'smiley-tongue-out', 1663 ':-@' => 'smiley-yell', 1664 ":'(" => 'smiley-cry', 1665 ':-(' => 'smiley-frown', 1666 ':-D' => 'smiley-laughing', 1667 ':-)' => 'smiley-smile', 1668 ':-/' => 'smiley-undecided', 1669 ':-X' => 'smiley-embarassed', 1670 '0:-)' => 'smiley-innocent', 1671 ':-|' => 'smiley-money-mouth', 1672 ':-0' => 'smiley-surprised', 1673 ';-)' => 'smiley-wink', 1674 ); 1675 1676 foreach ($emoticons as $idx => $file) { 1677 // <img title="Cry" src="http://.../program/js/tiny_mce/plugins/emotions/img/smiley-cry.gif" border="0" alt="Cry" /> 1678 $search[] = '/<img title="[a-z ]+" src="https?:\/\/[a-z0-9_.\/-]+\/tiny_mce\/plugins\/emotions\/img\/'.$file.'.gif"[^>]+\/>/i'; 1679 $replace[] = $idx; 1680 } 1681 1682 return preg_replace($search, $replace, $html); 1683 } 1684 1685 1686 /** 1650 1687 * Check if working in SSL mode 1651 1688 * … … 1882 1919 } 1883 1920 } 1921 -
program/steps/mail/sendmail.inc
r53604a0 r7472893 71 71 { 72 72 global $USER, $OUTPUT; 73 73 74 74 if ($sql_arr = $USER->get_identity($id)) { 75 75 $out = $sql_arr; … … 101 101 // remove any null-byte characters before parsing 102 102 $body = preg_replace('/\x00/', '', $body); 103 103 104 104 $searchstr = 'program/js/tiny_mce/plugins/emotions/img/'; 105 105 $offset = 0; … … 194 194 } 195 195 196 196 197 /****** compose message ********/ 197 198 … … 442 443 $MAIL_MIME->setHTMLBody($plugin['body']); 443 444 445 // replace emoticons 446 $plugin['body'] = rcmail_replace_emoticons($plugin['body']); 447 444 448 // add a plain text version of the e-mail as an alternative part. 445 449 $h2t = new html2text($plugin['body'], false, true, 0); … … 447 451 $plainTextPart = wordwrap($plainTextPart, 998, "\r\n", true); 448 452 if (!$plainTextPart) { 449 // empty message body breaks attachment handling in drafts 450 $plainTextPart = "\r\n"; 453 // empty message body breaks attachment handling in drafts 454 $plainTextPart = "\r\n"; 451 455 } 452 456 else { -
program/steps/utils/html2text.inc
r11bcac5 r7472893 20 20 */ 21 21 22 $converter = new html2text($HTTP_RAW_POST_DATA); 22 $html = $HTTP_RAW_POST_DATA; 23 24 // Replace emoticon images with its text representation 25 $html = rcmail_replace_emoticons($html); 26 27 $converter = new html2text($html); 23 28 24 29 header('Content-Type: text/plain; charset=UTF-8');
Note: See TracChangeset
for help on using the changeset viewer.
