Closed Bug 338592 Opened 18 years ago Closed 18 years ago

Print preview displays <a> tags between <noscript> tags as text instead of interpreting them

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
major

Tracking

()

RESOLVED DUPLICATE of bug 334944

People

(Reporter: jondmorrow, Unassigned)

References

()

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.3) Gecko/20060426 Firefox/1.5.0.3

When a page containing JavaScript and alternate <noscript> HTML is viewed in Firefox with the "Print Preview" command, two irregularities will appear in the on-screen and printed versions:

   1. The background will be grey instead of white.
   2. Any HTML tags between the <noscript> tags will be printed verbatim as text instead of being interpreted as HTML.  For example, <noscript><a href="http://www.google.com/">Search Google</a></noscript> will be displayed and printed literally as "<a href="http://www.google.com/">Search Google</a>".

When the page is printed in Firefox using the "Print" command without previewing it first, only irregularity #1 will appear, not #2.

When the JavaScript snippet is removed from the source, the page prints properly in all cases.

I've posted a self-documented example at http://tofu.f2o.org/ff/ff-print.html


Reproducible: Always

Steps to Reproduce:
1.  Visit http://tofu.f2o.org/ff/ff-print.html
2.  File > Print Preview.  Notice the HTML code printed next to the "Close" button, at the end of the page.
3.  Print.  Notice the HTML code prints as literal text.  Also notice the grey background.
4.  Now try File > Print (without previewing).  Notice that the HTML code doesn't print, but the background is still (wrongly) grey.
5.  Now follow the link on the page to the version without any JavaScript.  Notice that the page prints properly, with a white background.

Actual Results:  
The HTML code prints as literal test.

Expected Results:  
The HTML code shouldn't have printed.  The hyperlink should be displayed as a hyperlink.

Happens even in FF safe mode.
WFM - Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060517 Minefield/3.0a1 ID:2006051706
Note the following:

1) The background is grey rather than white
2) The HTML code highlighted in red shouldn't appear there as code

The page prints exactly as it (wrongly) appears.
*** Bug 338594 has been marked as a duplicate of this bug. ***
I notice also a third irregularity that appears in the version with JavaScript and not in the other version:

3.  The printed (and previewed) page doesn't shrink-to-fit properly.  Text is cut off at the right margin (see attached screenshot).
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060521 Minefield/3.0a1

I can confirm this with Firefox 1.5.0.3 but with latest Firefox Trunk all works fine. So I think that this reported bug is fixed.
(In reply to comment #7)
> Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060521
> Minefield/3.0a1
> 
> I can confirm this with Firefox 1.5.0.3 but with latest Firefox Trunk all works
> fine. So I think that this reported bug is fixed.
> 

Hello,
I have a similar problem with Firefox 1.5.0.3. I have javascript turned on.
Code:
<html><body>
  <noscript>Noscript text</noscript>
</body></html>
is displayed as a clear page, but in Print Preview "Noscript text" is displayed. I want to see the same pages in browser and in print preview. Does this work correctly in latest Firefox Trunk too?

(In reply to comment #8)
> Does this work correctly in latest Firefox Trunk too?

Yes.

Isn't this a dup of #334944?
(In reply to comment #10)
> Isn't this a dup of #334944?
> 

Yes.  The <NOSCRIPT> part of this bug has apparently been partially fixed in 1.5.0.4 -- but only partially (see #334944).  The grey-background part has not been fixed.  I'll file that separately.  Thanks.

*** This bug has been marked as a duplicate of 334944 ***
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
I've filed the grey-background problem as bug #340142.

Thanks Steve.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: