aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/download.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/download.php')
-rw-r--r--phpBB/download.php13
1 files changed, 6 insertions, 7 deletions
diff --git a/phpBB/download.php b/phpBB/download.php
index 41d09287de..cec44eaf1c 100644
--- a/phpBB/download.php
+++ b/phpBB/download.php
@@ -265,21 +265,20 @@ function send_file_to_browser($attachment, $upload_dir, $category)
exit;
}
-/*
+/**
* Get a browser friendly UTF-8 encoded filename
*/
function header_filename($file)
{
// There be dragons here...
- // IE follows no RFC, follow the RFC for extended filename for the rest
- if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false)
+ // IE and Safari follows no RFC.
+ if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false || strpos($_SERVER['HTTP_USER_AGENT'], 'Safari') !== false)
{
return "filename=" . rawurlencode($file);
}
- else
- {
- return "filename*=UTF-8''" . rawurlencode($file);
- }
+
+ // follow the RFC for extended filename for the rest
+ return "filename*=UTF-8''" . rawurlencode($file);
}
/**