Closed Bug 71735 Opened 24 years ago Closed 23 years ago

Attachments with spaces in the filename saved with %20s instead

Categories

(MailNews Core :: Backend, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9.3

People

(Reporter: bzbarsky, Assigned: mscott)

References

Details

(Keywords: regression, Whiteboard: [nsbeta1+])

Attachments

(1 file)

This is spun off of bug 71557. BuildID: 2001030905 ------- Additional Comments From apr@interactive.net 2001-03-12 13:06 ------- When I get a mail file attachment whose name is supposed to have spaces in it, the file is saved with a file name having %20s where spaces should be.
This was once fixed in bug 31422..
Keywords: regression
I have a fix to this problem. The problem is because code in the PromptForSaveToFile in nsUnknownContentTypeHandler does not go to nsUnescape to get rid of %20's, %40's, etc. I added a simple call to nsUnescape and blanks are gone in my attachment names now. I run Linux and I notice that Netscape 4 used to substitute underscores for blanks in filenames. I don't see any code in mozilla doing that but wonder if there should be.
daltenbern@intellispace.net, could you attach a patch for your fix to this bug? Then we can test it.... :)
*** Bug 77876 has been marked as a duplicate of this bug. ***
OS: Linux → All
Keywords: nsbeta1, nsCatFood
marking nsbeta1+ and moving to mozilla0.9.2. If there's a patch perhaps we can get it in sooner.
Whiteboard: [nsbeta1+]
Target Milestone: --- → mozilla0.9.2
moving to 0.9.3
Target Milestone: mozilla0.9.2 → mozilla0.9.3
*** Bug 84640 has been marked as a duplicate of this bug. ***
Keywords: nsBranch
FYI if you save the attachment directly from mail via the attachment pane context menu or the file menu then the file name is properly unescaped and you don't see the %20s. It's only when you double click the attachment and we bring up the helper app dialog that we don't unescape the file name. I'll post the fix for that.
Status: NEW → ASSIGNED
I've also seen space appear after moving/copying/d&d messages with attachments to other folders (e.g. draft folder). This has happened much less in newer builds though. So doubleclicking an attachment might not be the only cause for the dreaded "%20".
*** Bug 81693 has been marked as a duplicate of this bug. ***
Using windows build 2001-06-25 branch on win xp this is working fine. For a newly composed message, I saved as Draft, Saved as Template both OK, I sent them, both OK. I did a D&D of a message from IMAP inbox to a differenct IMAP folder, I did a Menu-Message Copy from an IMAP folder to a Local Folder, Menu Message Move from IMAP to another IMAP account - All OK. I double-clicked on the "bob on wire.jpg" and did a file save as = OK. I will check other platforms too, and report.
Keywords: nsBranch
sr=bienvenu
fix checked in. When QA'ing this bug remember the problem is with the save as dialog that comes after the helper app dialog AND NOT the one that comes if you save the attachment directly to disk from mail.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Shouldn't this bug fix *any* instances of saved filenames having "%20" (based on the summary of this bug)? If not, then the summary should be changed, and that person should file another bug on the remaining cases. Otherwise, *this bug is not fixed yet* (unless there are no other cases). ;)
using windows build 2001-08-29 on, saving a mail attachment with a space in the name: Save as after the helper app dialog saved correctly Save as using context menu on selected attachment saved correctly. Verified
Status: RESOLVED → VERIFIED
*** Bug 86392 has been marked as a duplicate of this bug. ***
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: