Commit 38ad408f authored by Oleg's avatar Oleg Committed by Dave Methvin

Fixes #13200 - innerHTML in buildFragment need end tags

parent 31b95797
...@@ -11,11 +11,11 @@ var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^> ...@@ -11,11 +11,11 @@ var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>
wrapMap = { wrapMap = {
// Support: IE 9 // Support: IE 9
option: [ 1, "<select multiple='multiple'>" ], option: [ 1, "<select multiple='multiple'>", "</select>" ],
tr: [ 1, "<table>" ], tr: [ 1, "<table>", "</table>" ],
td: [ 3, "<table><tbody><tr>" ], td: [ 3, "<table><tr>", "</tr></table>" ],
_default: [ 0, "" ] _default: [ 0, "", "" ]
}; };
// Support: IE 9 // Support: IE 9
...@@ -448,7 +448,7 @@ jQuery.extend({ ...@@ -448,7 +448,7 @@ jQuery.extend({
// Deserialize a standard representation // Deserialize a standard representation
tag = ( rtagName.exec( elem ) || ["", ""] )[ 1 ].toLowerCase(); tag = ( rtagName.exec( elem ) || ["", ""] )[ 1 ].toLowerCase();
wrap = wrapMap[ tag ] || wrapMap._default; wrap = wrapMap[ tag ] || wrapMap._default;
tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ); tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1></$2>" ) + wrap[ 2 ];
// Descend through wrappers to the right content // Descend through wrappers to the right content
j = wrap[ 0 ]; j = wrap[ 0 ];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment