Changeset 2186 in subversion


Ignore:
Timestamp:
Dec 22, 2008 1:27:25 PM (4 years ago)
Author:
alec
Message:

#1485640: http://pear.php.net/bugs/bug.php?id=13032
#1485640: html2text: move html_entity_decode() after preg_replace()

Location:
trunk/roundcubemail/program/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/lib/Mail/mimePart.php

    r2154 r2186  
    244244 
    245245        if (count($this->_subparts)) { 
    246             srand((double)microtime()*1000000); 
    247246            $boundary = '=_' . md5(rand() . microtime()); 
    248247            $this->_headers['Content-Type'] .= ';' . MAIL_MIMEPART_CRLF . "\t" . 'boundary="' . $boundary . '"'; 
  • trunk/roundcubemail/program/lib/html2text.php

    r2148 r2186  
    469469        $this->_convert_pre($text); 
    470470 
    471         // Replace known html entities 
    472         $text = html_entity_decode($text, ENT_COMPAT, 'UTF-8'); 
    473  
    474471        // Run our defined search-and-replace 
    475472        $text = preg_replace($this->search, $this->replace, $text); 
    476473        $text = preg_replace_callback($this->callback_search, array('html2text', '_preg_callback'), $text); 
     474 
     475        // Replace known html entities 
     476        $text = html_entity_decode($text, ENT_COMPAT, 'UTF-8'); 
    477477 
    478478        // Strip any other HTML tags 
Note: See TracChangeset for help on using the changeset viewer.