From: stronk7 Date: Sat, 3 Jan 2004 20:53:25 +0000 (+0000) Subject: Add one more eregi_replace, because the 'alnum' allows the X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e9f3e715ddddb119ac6788f5c397fbe5424a5825;p=moodle.git Add one more eregi_replace, because the 'alnum' allows the comma char and it can cause some problems in filenames. Off-topic: This is my 1st commit with my new eMac !! My old iMac screen died two days ago... :-( but I've recovered everything :-) --- diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 77b385bdc0..0367872b45 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -1331,6 +1331,7 @@ function clean_filename($string) { $string = stripslashes($string); $string = eregi_replace("\.\.", "", $string); $string = eregi_replace("[^(-|[:alnum:]|\.)]", "_", $string); + $string = eregi_replace(",", "_", $string); return eregi_replace("_+", "_", $string); }