From: Oleg Date: Sun, 13 Jan 2013 17:59:22 +0000 (+0400) Subject: Fixes #13200 - innerHTML in buildFragment need end tags X-Git-Tag: 2.0.0b1~5 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=38ad408f824492cd36a04d7c16df9df6c357ddb4;p=jquery.git Fixes #13200 - innerHTML in buildFragment need end tags --- diff --git a/src/manipulation.js b/src/manipulation.js index 66aa1984d..625baafe0 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -11,11 +11,11 @@ var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^> wrapMap = { // Support: IE 9 - option: [ 1, "", "" ], - tr: [ 1, "" ], - td: [ 3, "
" ], - _default: [ 0, "" ] + tr: [ 1, "
", "
" ], + td: [ 3, "", "
" ], + _default: [ 0, "", "" ] }; // Support: IE 9 @@ -448,7 +448,7 @@ jQuery.extend({ // Deserialize a standard representation tag = ( rtagName.exec( elem ) || ["", ""] )[ 1 ].toLowerCase(); wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>" ); + tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[ 2 ]; // Descend through wrappers to the right content j = wrap[ 0 ];