includes/functions.php
changeset 1035 d0d617124b29
parent 1027 98c052fc3337
child 1061 4ef865b5f497
--- a/includes/functions.php	Sun Jul 05 00:57:53 2009 -0400
+++ b/includes/functions.php	Mon Jul 06 11:26:21 2009 -0400
@@ -2851,6 +2851,13 @@
     $character = $str[$i];
     if ($character == '%' && $str[$i + 1] == 'u')
     {
+      if ( !preg_match('/^([a-f0-9]{2})+$/', substr($str, $i + 2, 4)) )
+      {
+        $res .= substr($str, $i, 6);
+        $i += 6;
+        continue;
+      }
+      
       $value = hexdec(substr($str, $i + 2, 4));
       $i += 6;