If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

<object>'s type attribute is sometimes ignored when different from file extension

RESOLVED INVALID

Status

()

Core
HTML: Parser
RESOLVED INVALID
6 years ago
6 years ago

People

(Reporter: Matthias Bockelkamp, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

6 years ago
If an <object> tag has a type attribute set that doesn't correspond to the data's file extension, then the type attribute is ignored.

Test case 1: Load a .htm file with <object data="file.htm" type="text/plain">.

Expected: The page source is shown.

Result: Sometimes the source is shown, sometimes the document is rendered.

Test case 2: Rename a .jpg file to .htm and try to display it with <object data="image.htm" type="image/jpeg">.

Expected: The image is shown.

Result: The file data is shown as if it was a HTML document.
The type attribute is advisory.  The server-provided MIME type, if any, overrides it.
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.