Skip to content

Commit

Permalink
Output supports urlencoded filename
Browse files Browse the repository at this point in the history
  • Loading branch information
yidas committed Mar 22, 2019
1 parent a20bc71 commit 907fc34
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/phpSpreadsheet/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ public static function output($filename='excel', $format='Xlsx')

// Redirect output to a client's web browser
header("Content-Type: {$contentType}");
header("Content-Disposition: attachment;filename=\"{$filename}{$extension}\"");
header("Content-Disposition: attachment;filename=\"" . urlencode($filename.$extension) . "\"");
header("Cache-Control: max-age=0");

$objWriter->save('php://output');
Expand Down

0 comments on commit 907fc34

Please sign in to comment.