" ]
},
safeFragment = createSafeFragment( document ),
fragmentDiv = safeFragment.appendChild( document.createElement("div") );
@@ -713,7 +713,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>$2>" ) + wrap[2];
+ tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>$2>" ) + ( wrap[2] || "" );
// Descend through wrappers to the right content
j = wrap[0];
diff --git a/test/unit/attributes.js b/test/unit/attributes.js
index 7b2f21ad0..db18d4543 100644
--- a/test/unit/attributes.js
+++ b/test/unit/attributes.js
@@ -94,7 +94,7 @@ test( "attr(String)", function() {
equal( jQuery("#tAnchor5").attr("href"), "#5", "Check for non-absolute href (an anchor)" );
jQuery("
").appendTo("#qunit-fixture");
equal( jQuery("#tAnchor5").prop("href"), jQuery("#tAnchor6").prop("href"), "Check for absolute href prop on an anchor" );
-
+
$("").appendTo("#qunit-fixture");
equal( jQuery("#tAnchor5").prop("href"), jQuery("#scriptSrc").prop("src"), "Check for absolute src prop on a script" );
@@ -1298,14 +1298,11 @@ test( "contents().hasClass() returns correct values", function() {
});
test( "coords returns correct values in IE6/IE7, see #10828", function() {
- expect( 2 );
+ expect( 1 );
var area,
map = jQuery("
");
area = map.html("
").find("area");
equal( area.attr("coords"), "0,0,0,0", "did not retrieve coords correctly" );
-
- area = map.html("
").find("area");
- equal( area.attr("coords"), undefined, "did not retrieve coords correctly" );
});
diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js
index 3a1d598d2..f0cdfa346 100644
--- a/test/unit/manipulation.js
+++ b/test/unit/manipulation.js
@@ -356,7 +356,7 @@ var testAppendForObject = function(valueObj, isFragment) {
};
var testAppend = function(valueObj) {
- expect(58);
+ expect(59);
testAppendForObject(valueObj, false);
testAppendForObject(valueObj, true);
@@ -440,6 +440,8 @@ var testAppend = function(valueObj) {
$radioParent.wrap("
");
equal( $radioChecked[0].checked, true, "Reappending radios uphold which radio is checked" );
equal( $radioUnchecked[0].checked, false, "Reappending radios uphold not being checked" );
+
+ equal( jQuery("
").append("option
")[0].childNodes.length, 2, "HTML-string with leading text should be processed correctly" );
};
test("append(String|Element|Array
|jQuery)", function() {
@@ -537,11 +539,11 @@ test("replaceWith on XML document (#9960)", function () {
xml2 = jQuery( xmlDoc2 ),
scxml1 = jQuery( ":first", xml1 ),
scxml2 = jQuery( ":first", xml2 );
-
+
scxml1.replaceWith( scxml2 );
-
+
newNode = jQuery( ":first>state[id='provisioning3']", xml1 );
-
+
equal( newNode.length, 1, "ReplaceWith not working on document nodes." );
});