MDL-51419 core_files: Support for utf8 in file names in MS Edge

This commit is contained in:
Jake Dallimore
2018-06-22 10:29:23 +08:00
parent 6153be6850
commit 4d5046b0eb
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ class MoodleExcelWorkbook {
header('Pragma: no-cache');
}
if (core_useragent::is_ie()) {
if (core_useragent::is_ie() || core_useragent::is_edge()) {
$filename = rawurlencode($filename);
} else {
$filename = s($filename);
+2 -2
View File
@@ -2115,7 +2115,7 @@ function send_temp_file($path, $filename, $pathisstring=false) {
}
// if user is using IE, urlencode the filename so that multibyte file name will show up correctly on popup
if (core_useragent::is_ie()) {
if (core_useragent::is_ie() || core_useragent::is_edge()) {
$filename = urlencode($filename);
}
@@ -2264,7 +2264,7 @@ function send_file($path, $filename, $lifetime = null , $filter=0, $pathisstring
}
// if user is using IE, urlencode the filename so that multibyte file name will show up correctly on popup
if (core_useragent::is_ie()) {
if (core_useragent::is_ie() || core_useragent::is_edge()) {
$filename = rawurlencode($filename);
}