Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit f0629f1

Browse files
committed
file name encoding when downloading in mode IE 11
In IE 11, There was a problem that file name encoding when downloading files in non-compatibility mode. IE 11 is needed to User-Agent check 'Trident'. So I Add 'preg_match' to check 'Trident' I only tested Korean Language, but I hope it will work in other language. Thanks!
1 parent 4ac3a3f commit f0629f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/core/classes/class.HTMLWriter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public static function javascriptErrorHandler($errorType, $errorMessage)
157157
*/
158158
public static function generateAttachmentsHeader(&$attachmentName, $dataSize, $isFile=true, $gzip=false)
159159
{
160-
if (preg_match('/ MSIE /',$_SERVER['HTTP_USER_AGENT']) || preg_match('/ WebKit /',$_SERVER['HTTP_USER_AGENT'])) {
160+
if (preg_match('/ MSIE /',$_SERVER['HTTP_USER_AGENT']) || preg_match('/ WebKit /',$_SERVER['HTTP_USER_AGENT']) || preg_match(‘/ Trident/’,$_SERVER[‘HTTP_USER_AGENT’])) {
161161
$attachmentName = str_replace("+", " ", urlencode(SystemTextEncoding::toUTF8($attachmentName)));
162162
}
163163

0 commit comments

Comments
 (0)