Skip to content
Snippets Groups Projects
Commit a1dfb851 authored by bgm's avatar bgm Committed by bgm
Browse files

CiviReport Export: fix bug when reports have a comma in their title

Mostly seen in Chrome-based browsers (not Firefox) on Windows.
If a report has a comma in the title, then the browser does not
recognize the file type.
parent d16c9ba9
Branches fixCommaFilename
No related tags found
1 merge request!10CiviReport Export: fix bug when reports have a comma in their title
Pipeline #2959 passed
......@@ -72,7 +72,7 @@ class Excel2007 extends OutputHandlerBase implements OutputHandlerInterface {
*/
public function download() {
\CRM_Utils_System::setHttpHeader('Content-Type', $this->getMimeType());
\CRM_Utils_System::setHttpHeader('Content-Disposition', 'attachment; filename=' . $this->getFileName());
\CRM_Utils_System::setHttpHeader('Content-Disposition', 'attachment; filename="' . $this->getFileName() . '"');
\CRM_Utils_System::setHttpHeader('Content-Description', $this->getFileName());
\CRM_Utils_System::setHttpHeader('Content-Transfer-Encoding', 'binary');
// Being over-zealous to make sure that the file is not cached
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment