#4255 closed defect (fixed)
Raw downloads of filenames with spaces are truncated in Firefox
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | wiki system | Version: | 0.10 |
Severity: | normal | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
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.
Attachments (0)
Change History (3)
comment:1 by , 18 years ago
Status: | new → assigned |
---|
comment:2 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
This should be fixed in r4351.
It was pretty tricky find an enocoding that worked in multiple browsers. I've successfully verified that this type of rfc2231 encoding works with all browsers I have access to right now (firefox 2 and ie6).
comment:3 by , 18 years ago
Milestone: | → 0.11 |
---|
You're right, the filename parameter should be escaped.