Changeset d483cd7 in github
- Timestamp:
- Apr 8, 2011 3:22:07 AM (2 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- d1d9fd8
- Parents:
- dd0ae62
- Files:
-
- 2 edited
-
CHANGELOG (modified) (1 diff)
-
program/lib/html2text.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CHANGELOG
rdd0ae62 rd483cd7 2 2 =========================== 3 3 4 - Fix bug where some content would cause hang on html2text conversion (#1487863) 4 5 - Improve space-stuffing handling in format=flowed messages (#1487861) 5 - Fix edbug where some dates would produce SQL error in MySQL (#1487856)6 - Fix bug where some dates would produce SQL error in MySQL (#1487856) 6 7 - Added workaround for some IMAP server with broken STATUS response (#1487859) 7 8 - Fix bug where default_charset was not used for text messages (#1487836) -
program/lib/html2text.php
r29c5422 rd483cd7 573 573 function _convert_pre(&$text) 574 574 { 575 // get the content of PRE element 575 576 while (preg_match('/<pre[^>]*>(.*)<\/pre>/ismU', $text, $matches)) { 576 $result = preg_replace($this->pre_search, $this->pre_replace, $matches[1]); 577 $text = preg_replace('/<pre[^>]*>.*<\/pre>/ismU', '<div><br>' . $result . '<br></div>', $text, 1); 577 // convert the content 578 $this->pre_content = sprintf('<div><br>%s<br></div>', 579 preg_replace($this->pre_search, $this->pre_replace, $matches[1])); 580 // replace the content (use callback because content can contain $0 variable) 581 $text = preg_replace_callback('/<pre[^>]*>.*<\/pre>/ismU', 582 array('html2text', '_preg_pre_callback'), $text, 1); 583 // free memory 584 $this->pre_content = ''; 578 585 } 579 586 } … … 640 647 * @param array PREG matches 641 648 * @return string 642 * @access private 643 */ 644 function _preg_callback($matches) 649 */ 650 private function _preg_callback($matches) 645 651 { 646 652 switch($matches[1]) { … … 660 666 661 667 /** 668 * Callback function for preg_replace_callback use in PRE content handler. 669 * 670 * @param array PREG matches 671 * @return string 672 */ 673 private function _preg_pre_callback($matches) 674 { 675 return $this->pre_content; 676 } 677 678 /** 662 679 * Strtoupper multibyte wrapper function 663 680 * 664 681 * @param string 665 682 * @return string 666 * @access private 667 */ 668 function _strtoupper($str) 683 */ 684 private function _strtoupper($str) 669 685 { 670 686 if (function_exists('mb_strtoupper'))
Note: See TracChangeset
for help on using the changeset viewer.
