// Convert html string into DOM nodes
if ( typeof arg == "string" ) {
// Trim whitespace, otherwise indexOf won't work as expected
- var s = jQuery.trim(arg), div = doc.createElement("div"), tb = [];
+ var s = jQuery.trim(arg).toLowerCase(), div = doc.createElement("div"), tb = [];
var wrap =
// option or optgroup
!s.indexOf("<opt") &&
[1, "<select>", "</select>"] ||
+ !s.indexOf("<leg") &&
+ [1, "<fieldset>", "</fieldset>"] ||
+
(!s.indexOf("<thead") || !s.indexOf("<tbody") || !s.indexOf("<tfoot")) &&
[1, "<table>", "</table>"] ||