Closed Bug 711608 Opened 13 years ago Closed 13 years ago

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

Categories

(Core :: DOM: HTML Parser, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: mbockelkamp, Unassigned)

Details

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
Closed: 13 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.