mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Added hyphen (-) to the list of allowed characters in a filename
This commit is contained in:
parent
60a60432a1
commit
5c219ea46d
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user