Bug Tracker

Opened 12 years ago

Closed 12 years ago

#11194 closed bug (invalid)

Passing a HTML tag with attributes to jQuery without a closing tag (either /> or </tag>) has different behaviour in IE 8

Reported by: oheard Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.1
Keywords: Cc:
Blocked by: Blocking:


When creating a new HTML element with attributes by passing the source to the jQuery constructor, if no closing tag is present most browsers create the element anyway.

IE 8 (and maybe below, I don't have < 8) return an empty jQuery object.

Example without attributes, showing the expected behavour: http://jsfiddle.net/HJyGz/0/

Example with an attribute, showing the buggy behaviour: http://jsfiddle.net/HJyGz/1/

Change History (1)

comment:1 Changed 12 years ago by dmethvin

Resolution: invalid
Status: newclosed

Yes, as clearly documented. If it needs a closing tag you should provide one. Just like script tags need a closing tag and can't be shortcutted.


Note: See TracTickets for help on using tickets.