Closed Bug 286752 Opened 20 years ago Closed 20 years ago

Saving a webpage as "Complete" messes with some tags

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: tom, Assigned: bugzilla)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1

It seems that saving a webpage as complete modifies some tags, removing end
markers for some tags.

For example, <br /> <hr /> <img ... ... /> tags all lose the final /.

This causes validation to fail as it maintains the DOCTYPE declaration from the
source.

Reproducible: Always

Steps to Reproduce:
1.  Load page
2.  Save as complete
3.  View/validate results.
Actual Results:  
Page tags are modified

Expected Results:  
Page tags left intact
It think that this is by design. You have to save the page as html only if you
want the orginal html.
The bug sounds valid, in that we shouldn't be screwing around with semantics for
no reason. We do make some changes in order to make a local copy of the page
actually *work*, but removing end markers isn't something that we should be doing.
The end markers are long gone by the time the save code gets the data, because
the data is served, and parsed, as HTML.  So there is no way we could preserve
them when saving, unless we started inserting them ourselves based on some
heuristic.

Note that modifications to a page via scripting can also produce DOMs that don't
correspond to valid HTML markup, so ending up with HTML documents that don't
validate is just a fact of life when saving the DOM...
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
(In reply to comment #3) 
> The end markers are long gone by the time the save code gets the data,  
 
The problem *only* occurs when you save a complete webpage.  Just saving the 
HTML seems to save correctly.  Does what you're saying still apply? 
Yes, of course.  When saving just the HTML, we save raw bytes (from cache or
network), hence no parsing is involved and nothing is changed about the page.
Just making sure :)  Cheers for the explanation. 
You need to log in before you can comment on or make changes to this bug.