Revert "Manipulation: don't auto-insert tbody"

This reverts commit e984d1c79c.

Fixes gh-2861
This commit is contained in:
Timmy Willison 2016-01-27 12:19:29 -05:00
parent cff3957457
commit 412c5dfb0d

View File

@ -38,14 +38,14 @@ var
rscriptTypeMasked = /^true\/(.*)/,
rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;
// Manipulating tables requires a tbody
function manipulationTarget( elem, content ) {
if ( jQuery.nodeName( elem, "table" ) &&
jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) {
return jQuery.nodeName( elem, "table" ) &&
jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ?
return elem.getElementsByTagName( "tbody" )[ 0 ] || elem;
}
return elem;
elem.getElementsByTagName( "tbody" )[ 0 ] ||
elem.appendChild( elem.ownerDocument.createElement( "tbody" ) ) :
elem;
}
// Replace/restore the type attribute of script elements for safe DOM manipulation