示例#1
0
 function do_entities_decode($data, $encoding)
 {
     static $cache = array();
     if (isset($cache[$encoding][$data])) {
         return $cache[$encoding][$data];
     } else {
         $return = SimplePie_Misc::change_encoding(html_entity_decode($data, ENT_QUOTES), 'ISO-8859-1', $encoding);
         if ($return == $data) {
             $return = SimplePie_Misc::change_encoding(SimplePie_Misc::replace_num_entity($data), 'UTF-8', $encoding);
         }
         $cache[$encoding][$data] = $return;
         return $return;
     }
 }