From: gustav_delius Date: Fri, 7 May 2004 17:07:31 +0000 (+0000) Subject: fixed bug 1037 by improving clean_filename() X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=8644437d66e93144d75d0552c0f2613fefd84413;p=moodle.git fixed bug 1037 by improving clean_filename() --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index f639ffff23..5fafa85170 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -1620,7 +1620,7 @@ function clean_filename($string) { /// alphanumeric _ - . $string = eregi_replace("\.\.+", "", $string); - $string = preg_replace('/[^\.\w-]/','_', $string ); // only allowed chars + $string = preg_replace('/[^\.a-zA-Z\d\_-]/','_', $string ); // only allowed chars $string = eregi_replace("_+", "_", $string); return $string; }