From 8644437d66e93144d75d0552c0f2613fefd84413 Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Fri, 7 May 2004 17:07:31 +0000 Subject: [PATCH] fixed bug 1037 by improving clean_filename() --- lib/moodlelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.39.5