Closed Bug 288526 Opened 20 years ago Closed 20 years ago

CNavDTD gets <object> tags with text content in the <head> wrong

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: mrbkap, Assigned: mrbkap)

References

Details

(Keywords: regression, testcase)

Attachments

(2 files)

When bug 285250 allowed <object> in <head>, I didn't take into account what would happen if the <object> had actual content. Currently, we get it wrong: namely, the page: <html><head><object>text!</object></head><body>hi</body></html> becomes: <html><head><object></object></head><body>text!hi</body></html> in the DOM. The proper way to fix this would be to handle non-leaf head content in the DTD. However, given the close proximity to the 1.8b2 freeze, and that such a fix would go hand in hand with removing skipped content, I'm suggesting that we simply not allow <object> in the <head> for now (i.e., our behavior before the patch for bug 285250). I plan to use this bug for both fixes (both short and long term).
Attached file testcase
This simply forces the <object> to be moved to the <body> as well as the text, preserving the structure of the DOM (though <object> should be in the <head>).
Attachment #179218 - Flags: superreview?(bzbarsky)
Attachment #179218 - Flags: review?(jst)
Attachment #179218 - Flags: superreview?(bzbarsky) → superreview+
Status: NEW → ASSIGNED
Flags: blocking1.8b2?
Keywords: regression, testcase
Comment on attachment 179218 [details] [diff] [review] short term solution r=jst
Attachment #179218 - Flags: review?(jst) → review+
Comment on attachment 179218 [details] [diff] [review] short term solution This is a safe fix that should probably go in 1.8b2.
Attachment #179218 - Flags: approval1.8b2?
Comment on attachment 179218 [details] [diff] [review] short term solution a=asa
Attachment #179218 - Flags: approval1.8b2? → approval1.8b2+
Attachment 179218 [details] [diff] has been checked in. Removing blocking? request since this is fixed well enough for 1.8b2.
Flags: blocking1.8b2?
Depends on: 272702
FIXED by the checkin for bug 272702.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: