Incorrect meta tag is used by Save As "Web, page complete" (character encoding specified incorrectly)

VERIFIED FIXED

Status

()

--
major
VERIFIED FIXED
12 years ago
11 years ago

People

(Reporter: tracy, Assigned: sciguyryan)

Tracking

({regression, smoketest})

Trunk
regression, smoketest
Points:
---
Bug Flags:
blocking1.9 +
in-testsuite ?

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Reporter)

Description

12 years ago
seeing this on all platforms with 05/14 trunk builds of Firefox.  I believe may have regressed due to bug 331991.

-load www.google.com
-save page as (choose web page complete)
-load the saved page

test results:  the saved page has an additional character before "more>>" and the copywrite symbol at the bottom of the page.

Comment 1

12 years ago
Due to the fix in bug 331991, the meta http-equiv element is replaced, and the new content attribute in it is broken:

Old: content="text/html; charset=UTF-8"

New: content="text/html; UTF-8"

Because of that, the character set is detected automatically, and usually incorrectly.

Updated

12 years ago
Summary: extraneous characters are appearing with Save As "Web, page complete" → Incorrect meta tag is used by Save As "Web, page complete" (character set specified incorrectly)
Please also write a regression test; there should have been one in bug 331991...
Assignee: dom-to-text → sciguyryan
Blocks: 331991
Flags: blocking1.9+
(Assignee)

Comment 3

12 years ago
Created attachment 264776 [details] [diff] [review]
Patch v1

Patch v1

Should fix the problem.
Attachment #264776 - Flags: superreview?(bzbarsky)
Attachment #264776 - Flags: review?(bzbarsky)
(Assignee)

Updated

12 years ago
Status: NEW → ASSIGNED

Comment 4

12 years ago
Created attachment 264780 [details]
simple testcase

Open the testcase. It should show the (R) symbol. If not, select UTF-8 encoding.
Save the testcase to disk (Web Page, complete).
Select View->Character Encoding->Western (ISO-8859-1)
Select View->Character Encoding->Auto-Detect->Off
Open the saved testcase from disk.
It should only show the (R) symbol.
Optionally: check that the meta tag is unchanged and specifies the character encoding the same way as before.
Comment on attachment 264776 [details] [diff] [review]
Patch v1

Looks OK, but I still want to see tests for this.
Attachment #264776 - Flags: superreview?(bzbarsky)
Attachment #264776 - Flags: superreview+
Attachment #264776 - Flags: review?(bzbarsky)
Attachment #264776 - Flags: review+

Comment 6

12 years ago
followup to #4
Sorry, at least the "Western (ISO-8859-1)" line is wrong; the optional part should be definitive.

Updated

12 years ago
Summary: Incorrect meta tag is used by Save As "Web, page complete" (character set specified incorrectly) → Incorrect meta tag is used by Save As "Web, page complete" (character encoding specified incorrectly)
(Assignee)

Updated

12 years ago
Flags: in-testsuite?
Whiteboard: [checkin needed]
(Assignee)

Updated

12 years ago
Whiteboard: [checkin needed]
Is this waiting for checkin?
(Reporter)

Updated

12 years ago
Duplicate of this bug: 384166
(Assignee)

Comment 9

12 years ago
(In reply to comment #7)
> Is this waiting for checkin?
> 

There isn't any need. This fix is included in the patch for bug 380668 which is marked for checkin.
(Assignee)

Comment 10

12 years ago
Fixed as part of bug 380668.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Reporter)

Comment 11

12 years ago
verified with Windows nightly trunk build from 20070619
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.