Save Page As writes incorrect code

RESOLVED INVALID

Status

Core Graveyard
File Handling
RESOLVED INVALID
16 years ago
2 years ago

People

(Reporter: Walt, Assigned: Bill Law)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

16 years ago
Hit the url and do Save Page as:
file name: foo.html
save as type: "Web Page, HTML only"

view the source of the original XHTML page.
 
You will notice that the met tags are missing the end /> in the 
meta tag for the saved version.  Also the formatting of the foo.html
file is completely wrong compared to the view source.  
The view source version is correct.

Save Page As shouldn't be modifying the the source.  The html page from the
server validates just fine with the w3c.  Uploading the saved file, since it is
modified and missing the /> in the meta tag does not validate correctly.



View Source Version
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  
  
  <head>
    <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type" />
    <title>phpHtmlLib Widgets - VerticalCSSNavTable</title>
    <link href="/css/defaulttheme.php" rel="stylesheet" type="text/css" />
  </head>
  
  
  <body>
    
    
    <table width="400" border="0" cellspacing="0" cellpadding="0"
id="verticalcssnav">

      <caption>VerticalCSSNavTable</caption>
      <tr>
        <td>
          <div id="subtitle">Widget</div>
          <a href="#" title="This is title text" id="navurl">Some Link</a>
          <a href="#" id="navurl">Another</a>
          <a href="#" title="This is title text" id="navurl">Another</a>

        </td>
      </tr>
    </table>
    
    
  </body>
  
  
</html>


Save Page As version:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"
xml:lang="en" lang="en"><head>
    <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">

    <title>phpHtmlLib Widgets - VerticalCSSNavTable</title><link
href="test_files/defaulttheme.css" rel="stylesheet" type="text/css"></head>



  <body>


    <table width="400" border="0" cellspacing="0" cellpadding="0"
id="verticalcssnav">
      <caption>VerticalCSSNavTable</caption>
      <tbody><tr>
        <td>
          <div id="subtitle">Widget</div>
          <a href="#" title="This is title text" id="navurl">Some Link</a>
          <a href="#" id="navurl">Another</a>
          <a href="#" title="This is title text" id="navurl">Another</a>
        </td>
      </tr>
    </tbody></table>


  </body></html>
(Reporter)

Comment 1

16 years ago
Created attachment 101198 [details]
the "Save Page As" file written to disk

This is the file that was created with the "Save Page As" menu option.
It incorrectly removes the / from the end meta tag.
(Reporter)

Comment 2

16 years ago
Created attachment 101199 [details]
The proper code that the Save Page As should write to disk

This contains the source that should have been written to disk
(Reporter)

Comment 3

16 years ago
Notice that the Save Page As also adds <tbody> tag to the table, which is not in
the orignal code served to the browser.  Why is Save Page as modifying the code
to disk?  This is very bad, besides the fact that what it does modify, it does
incorrectly.
Did you actually do "HTML Only"?  The attached file is exactly what "Web Page,
Complete" would save; note the href on the <link> element...
(Reporter)

Comment 5

16 years ago
No I didn't use the "HTML Only" option for the Save As.
That shouldn't matter.  The Save As Page shouldn't remove the end tag markers
for tags that don't have a closing tag, while in XHTML mode.  

This is besides the fact that most folks never notice/know there are several
options to save as, and what they are for.  

I tried to do HTML Only on my winblows machine and the file that it created
lives on 1 long line...no newlines.  This seems like a different bug all together.
Hmm.. Well, the problem is, I cannot reproduce this in HTML-only mode.

> while in XHTML mode

Who said Mozilla's in XHTML mode on that page?  It's most definitely not.  See
http://www.hixie.ch/advocacy/xhtml for an article that mentions the reasons why.

> most folks never notice/know there are several options to save as

Most folks want to _view_ their saved page, not edit it.  The default setting is
one that allows reasonable viewing.

I have to ask.  What build are you using?
QA Contact: sairuh → petersen

Comment 7

15 years ago
Reporter can you reproduce this bug with a newer build (1.4 final)?
If not, then please close this bug as worksforme. Thanks.
This is just invalid; the behavior in both modes is exactly what we want it to be.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → INVALID
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.