thomascube
2008-09-19 a3f149eb5729ef1ba6d1c05b29fead1058f4c888
program/include/main.inc
@@ -212,6 +212,7 @@
    return $str;
    
  $aliases = array(
    'US-ASCII'       => 'ISO-8859-1',
    'UNKNOWN-8BIT'   => 'ISO-8859-15',
    'X-UNKNOWN'      => 'ISO-8859-15',
    'X-USER-DEFINED' => 'ISO-8859-15',
@@ -347,7 +348,7 @@
      $str = strip_tags($str);
    
    // avoid douple quotation of &
    $out = preg_replace('/&([a-z]{2,5}|#[0-9]{2,4});/', '&\\1;', strtr($str, $encode_arr));
    $out = preg_replace('/&([A-Za-z]{2,6}|#[0-9]{2,4});/', '&\\1;', strtr($str, $encode_arr));
      
    return $newlines ? nl2br($out) : $out;
    }
@@ -643,7 +644,7 @@
function rcmail_xss_entitiy_decode($content)
{
  $out = html_entity_decode(html_entity_decode($content));
  $out = preg_replace('/\\\([a-z0-9]{4})/ie', "chr(hexdec('\\1'))", $out);
  $out = preg_replace('/\\\([0-9a-f]{4})/ie', "chr(hexdec('\\1'))", $out);
  $out = preg_replace('#/\*.*\*/#Um', '', $out);
  return $out;
}