From c7f3fdf70c57dcaba02cf5132c9cf7b6609e5fa8 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Wed, 14 Apr 2004 18:09:41 +0000 Subject: [PATCH] Modified the clean_filename() function to strip parenthesis and slashes. Not really sure if the method used is 100% correct ot no so, if you can check it.... Perhpas I should make the stripping in backup process, istead of using this central function. What do you think? --- lib/moodlelib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 22881e3cce..658253f491 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -1610,6 +1610,9 @@ function clean_filename($string) { $string = eregi_replace("\.\.", "", $string); $string = eregi_replace("[^(-|[:alnum:]|\.)]", "_", $string); $string = eregi_replace(",", "_", $string); + $string = eregi_replace("/", "_", $string); + $string = eregi_replace("\(", "_", $string); + $string = eregi_replace("\)", "_", $string); return eregi_replace("_+", "_", $string); } -- 2.39.5