]> git.mjollnir.org Git - moodle.git/commitdiff
Add one more eregi_replace, because the 'alnum' allows the
authorstronk7 <stronk7>
Sat, 3 Jan 2004 20:53:25 +0000 (20:53 +0000)
committerstronk7 <stronk7>
Sat, 3 Jan 2004 20:53:25 +0000 (20:53 +0000)
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 :-)

lib/moodlelib.php

index 77b385bdc0eee3039f4d8b3055c364a787e8efa1..0367872b454ed6f69c358e03a2d332eeb2b6bc45 100644 (file)
@@ -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);
 }