jquery/jquery — pull request #914 by dgalvez (2012-08-28 22:07:29+00:00)
Title: wrapMap.param added to avoid IE wrong <param HTMLElement> string parsing...

This fails in IE6/8:

jQuery("object").append( jQuery("") );

due to jQuery.clean tries div.innerHTML = wrap[1] + elem + wrap[2]; but afterwards div.childNodes[1] is a HTMLUnknownElement when elem ===

This means IE6/8 fails parsing "div

"

This is probably an issue that has been there since the original htmlSerialize support test commit: 520f1a26

The fix I propose is to avoid param HTMLElements having a wrapper by default in IE6/8. Since we don't know if this is impacting any other specific HTMLElement (I was not able to find any other case where this is happening), it seems to be the simplest solution. But I think it would be worthwhile double checking other non usual HTMLElement insertions.

Test case has been added.