From: moodler Date: Fri, 16 May 2003 06:08:42 +0000 (+0000) Subject: Added hyphen (-) to the list of allowed characters in a filename X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5c219ea46de8574693882208c64bd0518d83f593;p=moodle.git Added hyphen (-) to the list of allowed characters in a filename --- 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); }