Closed Bug 182291 Opened 22 years ago Closed 21 years ago

Saved Source is being moified despite preference settings.

Categories

(SeaMonkey :: Composer, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: xenotica, Assigned: Brade)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2) Gecko/20021126
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2) Gecko/20021126

Right Click saving page or frame as modifies the source. Tags are added, paths
are modified, etc. I have gone into the composer settings and told it to leave
everything alone and save th efile as is. But this is not happening. It's a real
pain in the ass to "view source" and save when you need to do this often and
with a great many pages.

Reproducible: Always

Steps to Reproduce:
1. In the Mozilla Composer settings, Select "Retain Origianl Source Format"
2. Save settings
3. View source and save the page
4. Right click "save page" or "frame" and save page or frame
5. Compare files. they are not the same

Actual Results:  
Mozilla saves the page after modifying tags and paths, despite telling it not to.

Expected Results:  
Left the page in the exact same state as if I had viewed source and saved.

As a developer responsible for Accessibility compliance testing, I have need of
saving a great many pages so that the compliance validation tool can spider
through the saved sources to generate my reports. We also get debug information
in the form of "saved" pages form our Customer Support center. It is very
difficult to debug pages when Mozilla is adding to the source and modifying them. 

It takes twice as long to "view source" and save than it does to just save the
page or frame as. Sooooo....
 
Mozilla should not make ANY modifications to a saved page unless the user
specifies it to do so. Saving pages "as is" should be the default browser behavior.
-> composer
Assignee: asa → brade
Component: Browser-General → Editor: Composer
QA Contact: asa → sujay
Actually I don't think this is a valid bug; the Composer preference you are
setting is intended only for use within Composer.

When you save, it sounds like you are in the browser.  Is this correct?
When you save are you using Web Page, Complete or Web Page, HTML Only?

If you are seeing a problem where the html is modified and you are saving "html
only" then we need to clarify this bug so that is clearer.
Saving a page as "Web Page, HTML only" should preserve the original formatting.
It is not preserved when "Web Page, HTML complete" is called since the document
must be fixed up so all the links work.

This is the piece of code which determines whether to saveDocument (save from
the in-memory DOM) or saveURI (dump the contents of the URI straight to disk
with no fixup).

http://lxr.mozilla.org/seamonkey/source/xpfe/communicator/resources/content/contentAreaUtils.js#342

It is worth noting that this code, specifies ENCODE_FLAGS_FORMATTED for the
saveDocument case which overrides any formatting in the original document.
Perhaps it shouldn't, or this behaviour could be tied to the composer pref.
Confirming.
Adam said: "Saving a page as "Web Page, HTML only" should preserve the original
formatting."  Not just *should*; in my quick test, it does.

Is this a Composer bug?  DOM-to-Text?
Status: UNCONFIRMED → NEW
Ever confirmed: true
could be a DOM to Text bug but with no more information I can't proceed...

-->Invalid

Please clarify if this is still a problem (and ask for bug to be reopened).
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → INVALID
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.