Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File names aren't output correctly #250

Closed
theodorejb opened this issue Aug 29, 2017 · 1 comment
Closed

File names aren't output correctly #250

theodorejb opened this issue Aug 29, 2017 · 1 comment
Assignees

Comments

@theodorejb
Copy link

theodorejb commented Aug 29, 2017

Issue summary

In version 8.2, file names containing a comma could be output without issues. In version 9, the commas are replaced with a percent encoding.

System information

Information Description
League\Csv version 9.0.1
PHP/HHVM version 7.1
OS Platform Windows Server 2012 R2
Browser Chrome 60

Standalone code, or other way to reproduce the problem

$csv = \League\Csv\Writer::createFromFileObject(new \SplTempFileObject());
$csv->insertOne(['Value']);
$csv->output('File name, with comma.csv');

Expected result

Downloaded file should be named File name, with comma.csv

Actual result

Downloaded file is named File name%2C with comma.csv in Chrome.
In Firefox, the downloaded file is named File%20name%2C%20with%20comma.csv
Only Internet Explorer downloads the file with the correct name.

@theodorejb theodorejb changed the title File names with commas aren't output correctly File names aren't output correctly Aug 29, 2017
@theodorejb
Copy link
Author

It looks like this is the commit that broke it: 87bc1aa#diff-a88754023d30e0f85dd47cb54f5de942R319

@nyamsprod nyamsprod self-assigned this Aug 30, 2017
nyamsprod added a commit that referenced this issue Aug 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants