forked from extern/egroupware
Limit subjects for filenames to 200 characters to avoid failures
This commit is contained in:
parent
9818b48bd8
commit
06fdb9c63d
@ -6448,7 +6448,7 @@ class Mail
|
||||
static function clean_subject_for_filename($filename)
|
||||
{
|
||||
static $filter_pattern = '$[\f\n\t\x0b\:*#?<>%"\|/\x{10000}-\x{10FFFF}\\\\]$u';
|
||||
$file = trim(preg_replace($filter_pattern, ' ', $filename));
|
||||
$file = substr(trim(preg_replace($filter_pattern, ' ', $filename)), 0, 200);
|
||||
if (empty($file)) $file = lang('empty');
|
||||
return $file;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user