summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/libraries/Upload.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index 96bb17edc..1f0bd6a6e 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -1005,7 +1005,14 @@ class CI_Upload {
'%3d' // =
);
- return stripslashes(str_replace($bad, '', $filename));
+ do
+ {
+ $old_filename = $filename;
+ $filename = str_replace($bad, '', $filename);
+ }
+ while ($old_filename !== $filename);
+
+ return stripslashes($filename);
}
// --------------------------------------------------------------------