Bug Tracker

Opened 10 years ago

Closed 10 years ago

#12812 closed bug (notabug)

$().add(html) returns different result on IE compared to Firefox/Chrome

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:


$().add("<div><option> hello </option></div>").html()

IE (9): returns " hello "

Chrome/Firefox: returns "<option> hello </option>"

Change History (2)

comment:1 Changed 10 years ago by Christian Meixner <[email protected]…>

This is not valid HTML

<div><option> hello </option></div>

OPTION is not allowed in DIV!


$().add("<div><select><option> hello </option><select></div>").html();

and everything works fine (though still crappy code, you don't have to use .add() here)

comment:2 Changed 10 years ago by dmethvin

Resolution: notabug
Status: newclosed

Agreed, invalid HTML has undefined results.

Note: See TracTickets for help on using tickets.