includes/functions.php
changeset 1035 d0d617124b29
parent 1027 98c052fc3337
child 1061 4ef865b5f497
equal deleted inserted replaced
1034:15fa1b4e730a 1035:d0d617124b29
  2849   while ($i <= $max)
  2849   while ($i <= $max)
  2850   {
  2850   {
  2851     $character = $str[$i];
  2851     $character = $str[$i];
  2852     if ($character == '%' && $str[$i + 1] == 'u')
  2852     if ($character == '%' && $str[$i + 1] == 'u')
  2853     {
  2853     {
       
  2854       if ( !preg_match('/^([a-f0-9]{2})+$/', substr($str, $i + 2, 4)) )
       
  2855       {
       
  2856         $res .= substr($str, $i, 6);
       
  2857         $i += 6;
       
  2858         continue;
       
  2859       }
       
  2860       
  2854       $value = hexdec(substr($str, $i + 2, 4));
  2861       $value = hexdec(substr($str, $i + 2, 4));
  2855       $i += 6;
  2862       $i += 6;
  2856 
  2863 
  2857       if ($value < 0x0080)
  2864       if ($value < 0x0080)
  2858       {
  2865       {