MDL-23740 fixed PARAM_TAG compatibility with utf-8 chars
authorPetr Skoda <skodak@moodle.org>
Wed, 11 Aug 2010 09:57:21 +0000 (09:57 +0000)
committerPetr Skoda <skodak@moodle.org>
Wed, 11 Aug 2010 09:57:21 +0000 (09:57 +0000)
lib/moodlelib.php

index f0e32fd..40ab829 100644 (file)
@@ -709,7 +709,7 @@ function clean_param($param, $type) {
             //problem, so remove *all* backslash.
             //$param = str_replace('\\', '', $param);
             //remove some nasties
             //problem, so remove *all* backslash.
             //$param = str_replace('\\', '', $param);
             //remove some nasties
-            $param = preg_replace('~[[:cntrl:]]|[<>`]~', '', $param);
+            $param = preg_replace('~[[:cntrl:]]|[<>`]~u', '', $param);
             //convert many whitespace chars into one
             $param = preg_replace('/\s+/', ' ', $param);
             $textlib = textlib_get_instance();
             //convert many whitespace chars into one
             $param = preg_replace('/\s+/', ' ', $param);
             $textlib = textlib_get_instance();