Open
Bug 343843
Opened 18 years ago
Updated 2 years ago
The content of "view source" and "save page" is different
Categories
(Toolkit :: View Source, defect)
Tracking
()
NEW
People
(Reporter: maurizio.domba, Unassigned)
References
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4
On this page there are several blocks like this
<div class="lapp">
<a href="...">
<img class="lappthumb" src="..." />
<div class="lapptxt">...</div>
<div class="lappstar"><img src="..." /><img src="..." /></div>
<div class="lapptxt">...</div>
</a>
</div>
When viewing source by "view source" it displays all blocks the same, but if you save the page and look at it some blocks are different... like this:
<div class="lapp">
<a href="...">
<img class="lappthumb" src="...">
</a><div class="lapptxt"><a href="...">...</a></div>
<a href="..."></a><div class="lappstar"><a href="..."><img src="..."><img src="..."></a></div>
<a href="..."></a><div class="lapptxt"><a href="...">...</a></div>
<a href="..."></a>
</div>
Reproducible: Always
Steps to Reproduce:
1. go to http://www.travel-tourist.com/objs-rovinj-2_hr.htm
2. refresh/reload page
Actual Results:
On this page there are informations for appartments displayed in "appartments blocks" cca 88px height... some "apartments blocks" are heigher (4-5times) then the others.
If all blocks are identical then it's enough to get a refresh/reload of the page and at least one of the blocks will be heigher...
For that "heigher" block the source in "view source" and in the saved page is different..
By refreshing/reloading the same page this "heigher" element changes place
Expected Results:
All blocks should be same height... as is in IE
Comment 1•18 years ago
|
||
Seems this is a problem with save page not view source as view source seems to be giving the correct code while save page is making a mess of things. Can anyone confirm this?
Reporter | ||
Comment 2•18 years ago
|
||
I didn't know what to choos from the drop down so I choosed the "view source"
The problem is with the "displaying/rendering" of the page...
With "view source" you see the original code how it should be, but when you look at that page some elements are displayed differently than the others and on every refresh this "different" elements changes...
When you look at the "saved page"... you see how firefox interprets this code when displaying it on screen... but the problem is: Why is it changing this code?
And that's not happening alays on the same "div box"...
Comment 3•18 years ago
|
||
(In reply to comment #2)
> When you look at the "saved page"... you see how firefox interprets this code
> when displaying it on screen... but the problem is: Why is it changing this
> code?
Definatly sounds like its a problem with the save page system (I believe that there have been a few like this in the past with XML).
Maye should be moved too Core -> File Handling.
Updated•18 years ago
|
Whiteboard: DUPEME
Comment 4•18 years ago
|
||
I'm assuming you're using "Web Page, complete" instead of "Web Page, HTML only". If you need the actual source that view-source shows, you should be using the HTML only option. The fact that it's not the original source code is intentional; the DOM is used instead of the original page source because the page needs to be modified for the "Web Page, complete" option to work.
The odd behavior is a combination of that and bug 328930, nondeterministic parsing of the case of an anchor containing a div.
Note that XML is irrelevant here because the page is being served with an HTML MIME type.
Marking dependency; I think once 328930 is fixed, we can consider this to be working correctly (I'm not sure if the end result will be what you're looking for, but at least it will be consistent).
Depends on: 328930
Reporter | ||
Comment 5•18 years ago
|
||
It's definitely a problem with the rendering of te <DIV>s inside the <A> (link)
.. at undefined times firefox gives a separate <A> element to every <DIV> inside an <A> element... but the problem is that it's not consistent... the problem appears here and there...
I solved this by using a <SPAN style="display:block"> instead of a <DIV>...
Comment 6•18 years ago
|
||
See code below. When run it shows a form. When the form is submitted it produces output. The View Source command shows the source of thge output looking OK. When the page is saved with Save As however, the previous page (the form) is saved.
Note1: the code was boiled down so it makes sense only to demonstrate the error.
Note2: This worked OK in versions <1.5.0.6.
CODE:
<?php
session_start();
if(!isset($_SESSION['mysession']))
{
$mysession=array('state'=>0);
}
else
{
$mysession=$_SESSION['mysession'];
}
?>
<html>
<head>
</head>
<body>
<?php
switch($mysession['state'])
{
default:
case 0:
showform();
$mysession['state']=1;
break;
case 1:
dostuff();
$mysession['state']=2;
$_SESSION=array();
break;
}
$_SESSION['mysession']=$mysession;
?>
</body>
</html>
<?php
function showform()
{
echo '<form method="post" action="">'
,'<textarea name="input" rows="20" cols="80"></textarea>'
,'<br><input type="submit"></form>'
;
}
function dostuff()
{
echo 'Output.';
}
?>
Comment 7•18 years ago
|
||
Please open a new bug. This bug is about specific changes to the source code of a page with an <a> containing a <div>. If you're getting a completely different page, then it's a different bug.
When you open that new bug, please provide the URL of a page that shows the problem if you can. PHP source code is useful to understand what the server is doing, but it's pain to get working because few people run a web server on their computers, and configuration differences could lead to different results.
Comment 8•18 years ago
|
||
(In reply to comment #7)
A new bus has been entered for this issue. With a URL.
> Please open a new bug. This bug is about specific changes to the source code
> of a page with an <a> containing a <div>. If you're getting a completely
> different page, then it's a different bug.
>
> When you open that new bug, please provide the URL of a page that shows the
> problem if you can. PHP source code is useful to understand what the server is
> doing, but it's pain to get working because few people run a web server on
> their computers, and configuration differences could lead to different results.
>
Comment 9•18 years ago
|
||
*** This bug has been marked as a duplicate of 210065 ***
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
Comment 10•18 years ago
|
||
Please read bugs more carefully before you dup them. This is a specific issue relating to Save as...Webpage complete. I really don't know what exactly the bug you duped it to refers to; it looks like some sort of cache issue, which is not at all relevant to this bug.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Comment 11•18 years ago
|
||
*** Bug 353664 has been marked as a duplicate of this bug. ***
Comment 12•18 years ago
|
||
FYI: The test case in duplicate bug 353664 is simpler.
Comment 13•18 years ago
|
||
Confirmed in "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/2006112804 Minefield/3.0a1".
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: DUPEME
Comment 14•18 years ago
|
||
Is this a duplicate of bug 302617?
Assignee | ||
Updated•16 years ago
|
Product: Firefox → Toolkit
Comment 15•14 years ago
|
||
No, this one is about saving an incorrect file. #302617 is about a View source problem, which is the reference in this bug.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•