Closed
Bug 118621
Opened 24 years ago
Closed 22 years ago
http://foo/bar/ default save name should be bar.html
Categories
(Core Graveyard :: File Handling, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.5beta
People
(Reporter: jmd, Assigned: Biesinger)
References
Details
Attachments
(1 file, 2 obsolete files)
|
1.46 KB,
patch
|
jag+mozilla
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
When saving a page, frame, link, etc, where there is no file name, but a
directory name, as in http://foo/bar/, the default file name for save should be
bar.html.
We already do this for locations of the form http://foo/... saving to foo.html.
This is split off from bug 115176.
Comment 1•24 years ago
|
||
*** Bug 120321 has been marked as a duplicate of this bug. ***
Comment 2•23 years ago
|
||
*** Bug 131412 has been marked as a duplicate of this bug. ***
Updated•23 years ago
|
QA Contact: sairuh → petersen
| Assignee | ||
Comment 3•23 years ago
|
||
So, it looks like we currently use the title of the page (I tested File|Save
page as). Is this bug for making it use the directoryname + .html in all cases?
Or only if there is no <title> (no idea what we do in this case)?
Or is this not about File|Save page as, but shift+link click, or another save
feature?
Comment 4•23 years ago
|
||
Yeah, this is for the case when there is no <title> (which is also the
"shift-click" case, so life is easy ;) ).
What we do right now is
http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/xpfe/communicator/resources/content/contentAreaUtils.js&rev=1.74&mark=737,743,770,776,%20781,787,792#734
| Assignee | ||
Comment 5•23 years ago
|
||
What about http://foo/bar/blah/
Should blah.html be used, or bar_blah.html?
(the second one is easier to implement, and I have a patch for that actually)
Comment 6•23 years ago
|
||
I think the proposal was that that would become blah.html
| Assignee | ||
Comment 7•22 years ago
|
||
-> me
Assignee: law → cbiesinger
Priority: -- → P2
Target Milestone: Future → mozilla1.5alpha
| Assignee | ||
Comment 8•22 years ago
|
||
| Assignee | ||
Updated•22 years ago
|
Attachment #126721 -
Flags: review?(jaggernaut)
| Assignee | ||
Updated•22 years ago
|
Status: NEW → ASSIGNED
| Assignee | ||
Comment 9•22 years ago
|
||
Comment on attachment 126721 [details] [diff] [review]
patch
actually this is not ideal, I have a slightly better patch (use .path instead
of .spec)
Attachment #126721 -
Attachment is obsolete: true
Attachment #126721 -
Flags: review?(jaggernaut)
| Assignee | ||
Comment 10•22 years ago
|
||
| Assignee | ||
Updated•22 years ago
|
Attachment #126722 -
Flags: review?(jaggernaut)
Comment 11•22 years ago
|
||
Comment on attachment 126722 [details] [diff] [review]
patch v2
You can get the result of |re.test(aDocumentURI.path)| by testing
|aDocumentURI.path.match(re)| against null, if you must.
| Assignee | ||
Updated•22 years ago
|
Target Milestone: mozilla1.5alpha → mozilla1.5beta
| Assignee | ||
Comment 12•22 years ago
|
||
Comment on attachment 126722 [details] [diff] [review]
patch v2
ok, I'll attach a new patch that nulltests .match
Attachment #126722 -
Attachment is obsolete: true
Attachment #126722 -
Flags: review?(jaggernaut)
| Assignee | ||
Comment 13•22 years ago
|
||
| Assignee | ||
Updated•22 years ago
|
Attachment #127264 -
Flags: review?(jaggernaut)
Comment 14•22 years ago
|
||
Comment on attachment 127264 [details] [diff] [review]
patch v2
r=jag if you inline the |re|.
Attachment #127264 -
Flags: review?(jaggernaut) → review+
| Assignee | ||
Updated•22 years ago
|
Attachment #127264 -
Flags: superreview?(bzbarsky)
Updated•22 years ago
|
Attachment #127264 -
Flags: superreview?(bzbarsky) → superreview+
| Assignee | ||
Comment 15•22 years ago
|
||
Checking in resources/content/contentAreaUtils.js;
/cvsroot/mozilla/xpfe/communicator/resources/content/contentAreaUtils.js,v <--
contentAreaUtils.js
new revision: 1.83; previous revision: 1.82
done
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 16•22 years ago
|
||
This does not seem to be functioning properly. For URLs that end in "/directory/",
Firebird is using the <title> as the default name. This is highly undesirable to me.
Tested at: http://www.google.com/options/
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030715 Mozilla Firebird/0.6
| Assignee | ||
Comment 17•22 years ago
|
||
this has always been a mozilla bug, so please test in mozilla. testing this in
firebird is worthless as I'm quite sure they forked this file. thanks.
| Reporter | ||
Comment 18•22 years ago
|
||
Filed Bug 212904 for firebird as advised by #firebird. Thanks for finally doing
99% of the work here, Christian. It was a pet peeve.
Comment 19•22 years ago
|
||
Comment on attachment 126722 [details] [diff] [review]
patch v2
>+ var re = /\/([^\/]+)\/$/;
>+ if (re.test(aDocumentURI.path)) {
>+ var path = aDocumentURI.path.match(re);
>+ if (path.length > 1)
>+ return validateFileName(path[1]);
>+ }
Actually the way to go here is
if (/\/([^\/]+)\/$/.test(aDocumentURI.path))
return validateFileName(Regexp.$1);
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•