Changeset 5861 in subversion


Ignore:
Timestamp:
Feb 8, 2012 4:06:59 AM (16 months ago)
Author:
alec
Message:
  • Handle HTML entities properly when converting strong/b/th content to upper case
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/lib/html2text.php

    r5497 r5861  
    700700 
    701701    /** 
    702      *  Strtoupper multibyte wrapper function 
    703      * 
    704      *  @param  string 
    705      *  @return string 
     702     *  Strtoupper multibyte wrapper function with HTML entities handling 
     703     * 
     704     *  @param string $str Text to convert 
     705     *  @return string Converted text 
    706706     */ 
    707707    private function _strtoupper($str) 
    708708    { 
     709        $str = html_entity_decode($str, ENT_COMPAT, RCMAIL_CHARSET); 
     710 
    709711        if (function_exists('mb_strtoupper')) 
    710             return mb_strtoupper($str); 
     712            $str = mb_strtoupper($str); 
    711713        else 
    712             return strtoupper($str); 
     714            $str = strtoupper($str); 
     715 
     716        $str = htmlspecialchars($str, ENT_COMPAT, RCMAIL_CHARSET); 
     717 
     718        return $str; 
    713719    } 
    714720} 
Note: See TracChangeset for help on using the changeset viewer.