Closed
Bug 127912
Opened 23 years ago
Closed 23 years ago
[FIX]saving as text via Save Link As [context menu] still saves as html
Categories
(Core Graveyard :: File Handling, defect, P2)
Core Graveyard
File Handling
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla1.0
People
(Reporter: bugzilla, Assigned: bzbarsky)
References
()
Details
Attachments
(1 file)
(deleted),
patch
|
law
:
review+
bugzilla
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
found while retesting bug 115207 comment 7 with 2002.02.25 comm bits. saving a
page as text via Save Page As works [toplevel File menu item, accel+S, or the
context menu item]. however, trying to save a web page as text via "Save Link
As" [from the context menu] does not work --the resulting file is still html source.
recipe:
1. go to http://mozilla.org/
2. for any link, bring up the context menu --eg, the "Testing" link on the left
side.
3. select "Save Link As..." from the context menu.
4. in the resulting file picker, choose "Text file" from the "files of type"
menulist.
5. [optional, since it doesn't seem to affect the outcome] change the extension
from .html to .txt [this should've been done automatically but isn't due to bug
115207].
6. click the Save button.
7. open the file in the browser, or simply view it in any text reader.
expected: the file should be text *without* the html markup.
actual results: the file is still in html.
Assignee | ||
Comment 1•23 years ago
|
||
Adam, does nsWebBrowserPersist even support doing SaveURI with conversion to
plaintext?
One of the args on nsIWebBrowserPersist::SaveDocument is the output mime type.
Pass text/plain here and the persist object should save in that format.
Interally all it does is pass the content type through to the encoder which
creates the appropriate serializer to feed the DOM into.
If you pass in nsnull for the content type, the persist object uses the content
type specified by the DOM document.
Assignee | ||
Comment 3•23 years ago
|
||
right. but we're doing SaveURI, not SaveDocument....
It sounds like we should just not have the text/plain option in the filepicker,
since the back end can't do it.
Assignee | ||
Comment 4•23 years ago
|
||
We should only be offering text mode for HTML files in cases when we are going
to do SaveDocument()
Comment on attachment 71591 [details] [diff] [review]
Proposed patch
r=law
Attachment #71591 -
Flags: review+
Assignee | ||
Comment 6•23 years ago
|
||
taking bug
Assignee: law → bzbarsky
Priority: -- → P2
Summary: saving as text via Save Link As [context menu] still saves as html → [FIX]saving as text via Save Link As [context menu] still saves as html
Target Milestone: --- → mozilla1.0
Comment 7•23 years ago
|
||
Comment on attachment 71591 [details] [diff] [review]
Proposed patch
sr=blake
Attachment #71591 -
Flags: superreview+
Comment 8•23 years ago
|
||
Comment on attachment 71591 [details] [diff] [review]
Proposed patch
a=asa (on behalf of drivers) for checkin to the 0.9.9 branch and the 1.0 trunk
Attachment #71591 -
Flags: approval+
Assignee | ||
Comment 9•23 years ago
|
||
checked in trunk and branch.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 10•23 years ago
|
||
vrfy'd fixed using 2002.03.13 comm bits on linux rh7.2, win2k and mac 10.1.3.
the resulting file picker from "save link as" now has only "web page, html only"
--the text option has been removed.
Status: RESOLVED → VERIFIED
Updated•8 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•