This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 9910 - <basefont> and <bgsound> should not break out of 'in head', should be treated as a void elements within <head>
Summary: <basefont> and <bgsound> should not break out of 'in head', should be treated...
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: All All
: P1 critical
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
Depends on:
Reported: 2010-06-11 06:28 UTC by Henri Sivonen
Modified: 2010-10-04 13:59 UTC (History)
4 users (show)

See Also:


Description Henri Sivonen 2010-06-11 06:28:53 UTC
It appears that the banking site TD Canada Trust uses the <basefont> element followed by the <base> element. Per the HTML5 parsing algorithm, <basefont> breaks out of "in head", so <base> gets appended to <body>, where it no longer establishes the base URL per . This breaks relative references on the site.

The appropriate fix would be making <basefont> in 'in head' insert an element for the token, immediately pop it, acknowledge the self-closing flag but not change the insertion mode.
Comment 1 Henri Sivonen 2010-06-11 06:52:18 UTC
It's reasonable to believe that bgsound needs the same treatment as basefont.

The alternatives are:
 1) Hoisting <base> back to <head>
 2) Letting <base> take effect in <body>

It seems that #2 isn't needed for Web compat if <base> stayed in <head> when written before </head>. Hoisting <base> to <head> seems pointlessly unstreamable compared to letting <basefont> and <bgsound> stay in <head>.
Comment 2 Henri Sivonen 2010-06-11 07:02:37 UTC
Both IE and Gecko's old parser treat <bgsound> as an element that doesn't close <head>.
Comment 3 Henri Sivonen 2010-06-11 07:11:58 UTC
...and in "after head", basefont and bgsound should be hoisted to <head>. That is, they should be parsed just like <link>.
Comment 4 Henri Sivonen 2010-06-11 08:01:07 UTC
Furthermore, based on IE behavior, <basefont> and <bgsound> should not set frameset-ok to 'not ok' and it's not useful to make them reconstruct the list of active formatting elements, since they don't render anything visual.
Comment 5 Ian 'Hixie' Hickson 2010-07-14 18:27:35 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 6 contributor 2010-07-14 18:27:57 UTC
Checked in as WHATWG revision r5160.
Check-in comment: Make basefont and bgsound get parsed more like <link> than like <img> for compatibility with the TD Canada Trust banking site.