clear file names from non-printable characters (for the dedi...)

This commit is contained in:
Steffen Schröder 2014-03-31 21:37:53 +02:00
parent 334b3b606c
commit 43badf4baa

View File

@ -90,6 +90,7 @@ abstract class FileUtil {
public static function getClearedFileName($fileName) {
$fileName = Formatter::stripCodes($fileName);
$fileName = str_replace(array('\\', '/', ':', '*', '?', '"', '<', '>', '|'), '_', $fileName);
$fileName = preg_replace( '/[^[:print:]]/', '', $fileName);
return $fileName;
}
}