From 8e6d95b9cf9f8f74c9f7e330dc965c10ce78feff Mon Sep 17 00:00:00 2001 From: Jake Dallimore Date: Tue, 29 May 2018 13:22:13 +0800 Subject: [PATCH] MDL-51419 core_files: Support for utf8 in file names in MS Edge --- lib/excellib.class.php | 2 +- lib/filelib.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/excellib.class.php b/lib/excellib.class.php index ff382526cd8..ef612b4bde9 100644 --- a/lib/excellib.class.php +++ b/lib/excellib.class.php @@ -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); diff --git a/lib/filelib.php b/lib/filelib.php index 53f07db0c90..a8c844a2b1c 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -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); }