Closed
Bug 42009
Opened 25 years ago
Closed 24 years ago
DnD url to Windows desktop should ensure a valid filename
Categories
(Core :: XUL, defect, P3)
Tracking
()
mozilla0.9.9
People
(Reporter: Chris244, Assigned: mikepinkerton)
References
Details
(Keywords: helpwanted, Whiteboard: [nsbeta3-])
Attachments
(1 file)
1.18 KB,
patch
|
Details | Diff | Splinter Review |
The title of a document is used as the filename when dragging from the browser
(link proxy icon for example) to the Windows desktop. The title may not be a
valid filename, so it should be converted to one before passing it as a
filename.
In particular:
< > : " / \ |
and any control characters (< 32) should be converted to a safe character like
space or deleted.
Another thing to consider is if the filename is the same as a system device like
aux, con, prn, etc.
Comment 1•25 years ago
|
||
assigning to pinkerton, nominating for nsbeta2
Assignee: trudelle → pinkerton
Keywords: nsbeta2
Assignee | ||
Comment 2•25 years ago
|
||
anticipating nsbeta2+
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Target Milestone: --- → M18
Thought we were not doing Dnd to desktop...trudelle?
Whiteboard: [NEED INFO]
Comment 4•25 years ago
|
||
That feature (bug 37410) was granted nsbeta2+ [6/22] status at a PDT triage
session I attended 10 days ago. We had a fix from an external contributor, but
found equivalent code elsewhere in mozilla that had already been tested. I'd
expect that we already have code that flags invalid file names to fix this bug,
too.
Assignee | ||
Comment 5•25 years ago
|
||
this is dependent on 41985, which probably won't be fixed until beta3.
nominating for beta3.
Updated•25 years ago
|
Whiteboard: nsbeta3+
Updated•25 years ago
|
Whiteboard: nsbeta3+ → [nsbeta3+]
Assignee | ||
Comment 6•25 years ago
|
||
pushing out, marking helpwanted.
I'm in! (After being the best man at a wedding in Vegas next Tuesday, of
course)
Comment 9•25 years ago
|
||
I expect this is pretty easy so perhaps Dean and I can work out a fix when I
get back (Tuesday)
Comment 10•25 years ago
|
||
Japanese SJIS(shift jis) multibyte-character ranges
0x0020-0x00ff,0x8140-0xfcff,
so please be careful not to use simple method like 's/\\/./g'.
Assignee | ||
Updated•25 years ago
|
Target Milestone: Future → mozilla1.0
Comment 11•25 years ago
|
||
Blake, I can't recall us ever looking at this. Whenever you're up for it, let
me know.
Comment 12•24 years ago
|
||
If we remove ':', I think we'll remove the possibility of coming up with a valid
device name, as most end with a colon (eg. "lpt1:"). I can do this, but I want
to make sure that I've got all characters considered. The original bug is to
change < > : " / \ | any character < 32. I'm not sure what to make of the
Japanese SJIS comment from takagix, though.
Comment 13•24 years ago
|
||
Comment 14•24 years ago
|
||
Here's an initial implementation, to get people talking. Any invalid character
is replaced with a single space. I grabbed the list of invalid characters from
the mozclassic code.
This doesn't handle unicode, but neither does the rest of the function.
invalidChars could be localized, but my suspicion is that they're the same on
all Windows locales.
Assignee | ||
Updated•24 years ago
|
Target Milestone: mozilla1.0 → mozilla0.9.9
Comment 15•24 years ago
|
||
anyone have any thoughts?
Comment 16•24 years ago
|
||
*** This bug has been marked as a duplicate of 78509 ***
You need to log in
before you can comment on or make changes to this bug.
Description
•