From 5c219ea46de8574693882208c64bd0518d83f593 Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 16 May 2003 06:08:42 +0000 Subject: [PATCH] Added hyphen (-) to the list of allowed characters in a filename --- lib/moodlelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index ee69d5cb70..42ed7df0d0 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -949,7 +949,7 @@ function clean_filename($string) { /// Cleans a given filename by removing suspicious or troublesome characters $string = stripslashes($string); $string = eregi_replace("\.\.", "", $string); - $string = eregi_replace("[^([:alnum:]|\.)]", "_", $string); + $string = eregi_replace("[^(-|[:alnum:]|\.)]", "_", $string); return eregi_replace("_+", "_", $string); } -- 2.39.5