Closed
Bug 259903
Opened 20 years ago
Closed 19 years ago
save as plain text saves the file with the wrong extention (.html instead of .txt)
Categories
(Camino Graveyard :: Downloading, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
Camino1.0
People
(Reporter: david.fedoruk, Assigned: nick.kreeger)
References
()
Details
(Keywords: fixed1.8)
Attachments
(3 files, 2 obsolete files)
5.76 KB,
text/plain
|
Details | |
6.66 KB,
application/zip
|
Details | |
3.06 KB,
patch
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a4) Gecko/20040915 Camino/0.8+ Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a4) Gecko/20040915 Camino/0.8+ When saving a web page as plain text the dialogue box is selected as plain text but the file name is still file.html and the resulting file is the comlete html code. Reproducible: Always Steps to Reproduce: 1. File --> Save As 2. Select plain text (this is already selected) 3. click Save Actual Results: The selected file is saved as an html document not plain text. Expected Results: The page should have been saved as a plain text documenting with NO html tags.
Comment 1•20 years ago
|
||
does this work in 0.8.1? was it a regression on the trunk?
Reporter | ||
Comment 2•20 years ago
|
||
Since there seems to be some puzzlement about what is being saved, this is an example saved from this buiild 2004091808 (v0.8+) URL: http://www.saila.com/usage/layouts/
Reporter | ||
Comment 3•20 years ago
|
||
It seems this is done on purpose <http://bugzilla.mozilla.org/show_bug.cgi?id=16800>. However a problem still persists in that Camino AND Mozillz save text documents with the wrong extension. Camino saves this text document with an html extension where it should be .txt
Is it just me, or does the whole save as plain text seem stupid as it will always be the same as "save as source" as both files will be plain text. Only difference will be the extension. Perhaps removing "save as plain text"?
Reporter | ||
Comment 5•20 years ago
|
||
I've now changed the bug to a problem with correct file extension.
Summary: attempting to save a page as plain text, saves as html → save as plain text saves the file with the wrong extention (.html instead of .txt)
Let's confirm the shall we :)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Updated•19 years ago
|
Priority: -- → P2
Target Milestone: --- → Camino1.0
Is this related to bug 181029?
Comment 9•19 years ago
|
||
(In reply to comment #8) > Is this related to bug 181029? Sounds like it is, yeah. It could also be an encoding problem, similar to our treatment of gzip files on some (improperly configured) servers.
Assignee | ||
Comment 10•19 years ago
|
||
Problem occurs in Deer Park Alpha 2, so it is a gecko/necko issue
Comment 11•19 years ago
|
||
Well, we copied some of their downloading code. I think we choose our own file extension in the download sniffer code.
Assignee | ||
Comment 12•19 years ago
|
||
inspecting smfrs comments......
Assignee | ||
Comment 13•19 years ago
|
||
Taking. Problem is that we are saving correctly, and the sniffer correctly assigns the content to plain/text, but the .html extension is not getting changed to .txt when the "plain text" option is saved..
Assignee | ||
Comment 14•19 years ago
|
||
OK, Have a working solution, to append .txt to the file name, but a question about what to do here. // Assume the file is called index.html Should we just rename the file to index.txt OR should we add the extension index.html.txt??? I vote for option 2 as you can keep track of what plain text you were trying to save. Any other ideas, suggestions???
Updated•19 years ago
|
Assignee: joshmoz → nick.kreeger
Comment 15•19 years ago
|
||
I agree with option 2 as it will allow people to know what they were saving.
Assignee | ||
Comment 16•19 years ago
|
||
Perhaps changing the extension to index.html.txt in the text field on the save dialog?
When we save pages (like Bugzilla bug) as HTML Complete, they get saved as foo.cgi.html, so foo.cgi.txt seems appropriate here, too. That new name is suggested in the Save dialogue for HTML Complete, so Plain Text should also suggest the name it's going to use. (Seems like right now the logic for all three "Save as" variations is the same.)
Assignee | ||
Comment 18•19 years ago
|
||
This patch will append .txt to a file name if the option to save is "plain text". The filename in the save dialog cannont be manually changed since the dialog is run with one command with a return value. The best way I could find to fix a simple problem like this is to simply append a .txt to the filename after the dialog closes and the user selected "plain text".
Attachment #191696 -
Flags: review?(pinkerton)
Assignee | ||
Updated•19 years ago
|
Attachment #191696 -
Flags: review?(pinkerton) → review?(sfraser_bugs)
Assignee | ||
Comment 19•19 years ago
|
||
working on actually updating changes with a hack in a NSSavePanel accessory..
Assignee | ||
Updated•19 years ago
|
Attachment #191696 -
Attachment is obsolete: true
Assignee | ||
Comment 20•19 years ago
|
||
Comment on attachment 191696 [details] [diff] [review] This patch appends .txt if the save option is plain text Reworking patch so removing review, sorry for the spam
Attachment #191696 -
Flags: review?(sfraser_bugs)
Assignee | ||
Comment 21•19 years ago
|
||
Assignee | ||
Comment 22•19 years ago
|
||
Assignee | ||
Comment 23•19 years ago
|
||
Attachment #192957 -
Attachment is obsolete: true
Comment 24•19 years ago
|
||
Looks good! Tested and checked in, trunk and branch.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•