Closed Bug 603614 Opened 15 years ago Closed 15 years ago

Save Page As... Web Page, complete on valid page saves HTML file with [many] errors

Categories

(Firefox :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: chealer, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100916 Iceweasel/3.6.10 (like Firefox/3.6.10) Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.10) Gecko/20100916 Iceweasel/3.6.10 (like Firefox/3.6.10) By default, Firefox saves pages as "Web Page, complete". This saves an HTML pages plus the media associated with it like images and CSS files. Making the page use these local media files requires changing the HTML file. The HTML file saved is therefore not the same as the original. Unfortunately, the file saved has extensive modifications from the original, enough to break it. For example, taking the validating homepage of w3.org, it is converted to a page with tens of errors (The w3.org homepage is the first I tried to get an example not on localhost. This must affect many pages). For example, the start is changed from: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> to: <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" lang="en"> Note the change of case in "html". This causes these errors: *** Errors validating World Wide Web Consortium (W3C).html: *** Error at line 1, character 109: DTD did not contain element declaration for document type name Error at line 2, character 67: document type does not allow element "html" here Reproducible: Always Steps to Reproduce: 1. Go to affected page. 2. Check validity 3. Save Page As... Web Page, complete 4. Check validity of saved HTML file Actual Results: Second validity checks shows more errors than the first. Expected Results: Same number of errors in both validity checks.
Is the document served with a mime-type of text/html or with some xhtml mime-type?
As text/html
Then that's your problem ;-) html is case insensitive, xhtml is case sensitive. If you have an xhtml page it must be served with the correct mime-type.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.