Ticket #4255 (closed defect: fixed)
Raw downloads of filenames with spaces are truncated in Firefox
| Reported by: | octo@… | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.11 |
| Component: | wiki system | Version: | 0.10 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
When selecting the raw download of an attached file from within Firefox, if the filename contains spaces, the filename is truncated at the first space.
For example, "Foo%20Bar.pdf" is seen as "Foo" by Firefox, which causes problems.
The problem is that the "filename=" parameter of the "Content-Disposition" header does not quote the filename, which confuses Firefox. (Other browsers work around this confusion, from what I've seen.)
The solution is to go to line 561 of attachment.py and add quotes to be printed around attachment.filename in the Content-Disposition header.


