bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

View Source shows strange formed thing for js-gened docs

RESOLVED DUPLICATE of bug 382074

Status

()

Toolkit
View Source
RESOLVED DUPLICATE of bug 382074
12 years ago
10 years ago

People

(Reporter: chado, Unassigned)

Tracking

({regression})

Trunk
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

66.00 KB, image/png
Details
3.96 KB, text/html
Details
(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.7) Gecko/20060910 SeaMonkey/1.0.5
Build Identifier: 2006-09-20-04-trunk and later builds

View Source shows strange formed thing for js-generated documents.


Reproducible: Always

Steps to Reproduce:
1. open the testcase.
2. click one of the links selecting charset.
   small new window will come up and little text will be shown.
3. try Page Source from View menu or ctrl+u.

Actual Results:  
Strange formed plain thing comes.


Expected Results:  
Syntax highlighted easy readable source should be shown.


View Selection Source (DOM Source) still works fine.
I'm seeing this on WinXP/Linux/MacOSX.
testcase and screenshot are following.

Range of builds to reproduce:
2006-09-19-04-trunk and earlier builds work fine.
2006-09-20-04-trunk and later builds including 2006-10-29-04-trunk do not work.
(Reporter)

Comment 1

12 years ago
Created attachment 244019 [details]
testcase
(Reporter)

Comment 2

12 years ago
Created attachment 244020 [details]
screenshot
(Reporter)

Comment 3

12 years ago
setting Version Trunk.
adding regression keyword.
Keywords: regression
Version: unspecified → Trunk
(Reporter)

Comment 4

12 years ago
Created attachment 244022 [details]
testcaset

reattaching testcase.
previous one was not good to attach.
Attachment #244019 - Attachment is obsolete: true
Sounds related to bug 286365.

Comment 6

12 years ago
I'll take a look at this but I just wanted to add that you don't need view source to reproduce this. Just fiddling around with the Character Settings Encoding will reproduce it. I suspect the problem lies in the fact that the document is dynamically generated via javascript.
(Reporter)

Comment 7

12 years ago
Tae: You're right.  The testcase I've attached is not minimum.
It came from other past bug, had included i18n thing.
When you click "no charset" link, generated doc will be more minimal,
even while DOCTYPE line would not be needed.

Now, I've tried local build with 2006-10-29-04 cvs, 
backed out attachment 238893 [details] [diff] [review] for bug 286365.
The problem has gone.
Also, View Source on Feed View issue, mentioned in bug 286365 c#12, worked.

Comment 8

12 years ago
Happens with the testcase 244022 on Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20061030 Minefield/3.0a1

Comment 9

12 years ago
Here's what I got so far. It looks like the dynamically created document is internally handled as UTF-16 but the Character Encoding setting defaults to UTF-8. That setting is a lie, which you can test by doing the following:

1. Open the window
2. Go to View->Character Encoding
3. It should be set to UTF-8, so just click the same setting.
4. The page changes into gibberish even though you haven't changed anything.
5. Now, click UTF-16, the page returns to normal.

Also notice that the specified content-type is totally ignored.

View-source is simply believing the lie that it really is UTF-8. Set the charset to UTF-16 first and then view the source. Everything should work fine.

We need to either change the default charset to UTF-16 or handle the content as UTF-8 or make it respect the content-type. The best is to probably make it respect the content-type and then default to UTF-8 if none is specified.
Confirmed against testcase. Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a2pre) Gecko/20061219 Minefield/3.0a2pre
Latest 2.x release doesn't display this behavior, so we need to narrow down the regression window.
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

11 years ago
Duplicate of this bug: 376810

Comment 12

11 years ago
Forward-duping to bug 382074, which has a clearer summary and comments from bz.  Sorry for not finding this one earlier.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 382074
(Assignee)

Updated

10 years ago
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.