Closed
Bug 313823
Opened 19 years ago
Closed 19 years ago
<!meta ...> and <metaxyz ...> treated as <meta ...> when content=...charset
Categories
(Core :: DOM: HTML Parser, defect, P3)
Core
DOM: HTML Parser
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: moz, Assigned: mrbkap)
Details
(Keywords: testcase)
Attachments
(3 files, 1 obsolete file)
378 bytes,
text/html
|
Details | |
383 bytes,
text/html
|
Details | |
2.93 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1
Constructs like this:
<!meta http-equiv="content-type" content="text/html; charset=iso-8859-7">
and this:
<metaXXX http-equiv="content-type" content="text/html; charset=iso-8859-7">
are handled same like this:
<meta http-equiv="content-type" content="text/html; charset=iso-8859-7">, but must be ignored completely.
Reproducible: Always
Steps to Reproduce:
1. go to upcoming testcases
Actual Results:
displaying greek letters
Expected Results:
displaying german umlauts
Assignee | ||
Comment 3•19 years ago
|
||
Ouch. I think the problem is in nsParser.cpp somewhere.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows 98 → All
Priority: -- → P3
Hardware: PC → All
Target Milestone: --- → mozilla1.9alpha
Comment 4•19 years ago
|
||
It might also be in nsMetaCharsetObserver.cpp. We do support some common invalid forms of meta charset declarations for compatibility, but this is clearly going too far :)
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 5•19 years ago
|
||
This patch does two things: makes the meta charset sniffing code treat <!...> as a comment and refuse to treat anything other than <meta\s+> as a meta tag. The comment sniffing code is not foolproof, but I think that should be fine. The other test seems a bit strict, since it rejects <meta>, but that's OK, since we'd ignore such tags in this code anyway.
Attachment #201299 -
Flags: review?(jst)
Assignee | ||
Comment 6•19 years ago
|
||
Comment on attachment 201299 [details] [diff] [review]
Fix both forms
Oops, this doesn't skip the "comment" quite as I thought it would.
Attachment #201299 -
Attachment is obsolete: true
Attachment #201299 -
Flags: review?(jst)
Assignee | ||
Comment 7•19 years ago
|
||
Attachment #201301 -
Flags: review?(jst)
Comment 8•19 years ago
|
||
Comment on attachment 201301 [details] [diff] [review]
Better comment skipping
r+sr=jst
Attachment #201301 -
Flags: superreview+
Attachment #201301 -
Flags: review?(jst)
Attachment #201301 -
Flags: review+
Assignee | ||
Comment 9•19 years ago
|
||
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•