diff --git a/core/modules/file/file.module b/core/modules/file/file.module index c945d2b6b5..7c4b5425ca 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -1479,12 +1479,12 @@ function template_preprocess_file_link(&$variables) { * The shortened filename, or the original filename if it's less than $limit * characters long. */ -function file_shorten_filename($filename, $limit = 10) { +function file_shorten_filename($filename, $limit = 17) { $ext = pathinfo($filename, PATHINFO_EXTENSION); $name = pathinfo($filename, PATHINFO_FILENAME); if (strlen($name) > $limit) { - return substr($name, 0, $limit) . '...' . substr($name, -4) . '.' . $ext; + return substr($name, 0, ($limit - 7)) . '...' . substr($name, -4) . '.' . $ext; } else { return $filename;