Closed
Bug 23894
Opened 25 years ago
Closed 25 years ago
Cannot save attachment if name contains a quote (')
Categories
(MailNews Core :: MIME, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
M13
People
(Reporter: bugzilla, Assigned: mscott)
Details
If I receive a message with a file attached to it and the attachment name contains some special characteres like a quote, you cannot save it when you clik on the attachment icon. We get the following JS error: JavaScript Error: illegal character Line text: 'OpenAttachURL('imap%3A//qatest03%40nsmail-2%3A143/fetch%3EUID%3E/INBOX%3E634%3Fpart%3D1.2', 'l'ÈtÈ.txt', 'imap_message://qatest03@nsmail-2/INBOX#634')' I don't know if this bug if for jefft or for rhp.
Reporter | ||
Updated•25 years ago
|
Summary: Cannot save attachment if name contains an quote (') → Cannot save attachment if name contains a quote (')
Updated•25 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M13
Comment 1•25 years ago
|
||
Ok guys, what is the "right" fix for this. The problem is that when we have characters like ' or " in a filename, it breaks the JS syntax. Is there a way to safeguard the JS to ignore what is in the string, or do we have to escape it before we pass it into JS? Just wondering what the right change goes. - rhp
Comment 2•25 years ago
|
||
Hi Naoki, I need to escape a unicode string. Is there a function that would allow me to do this? Also, mscott: I think what we need to do is escape the string in the emitter and then unescape it in JS. That's what Jeff and I were thinking made sense. - rhp
Assignee | ||
Comment 3•25 years ago
|
||
Rich, I have a fix for this in my tree. You can re-assign this to me if you want. You definetly don't want to escape the string in the mime emitter because then the attachment won't display correctly! The display name will be escaped which isn't correct. In JS you can escape a string by calling escape(string). I also had to unescape it in messenger. I'll check it in when the tree opens. I set up a test case and it works.
Updated•25 years ago
|
Assignee: rhp → mscott
Status: ASSIGNED → NEW
Comment 4•25 years ago
|
||
Over to you Scott! - rhp
Assignee | ||
Updated•25 years ago
|
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 5•25 years ago
|
||
Fix checked in.
Linux (2000-03-09-08 M14) Win32 (2000-03-08-13 M14) Mac (2000-03-07-08 M14)mozilla This problem has been fixed. Using previous Mac build because 3/8 and 3/9 Mac builds are broken.
Status: RESOLVED → VERIFIED
Updated•20 years ago
|
Product: MailNews → Core
Updated•16 years ago
|
Product: Core → MailNews Core
Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•