X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fmanipulation.js;h=c250b53e7f733732dfbc977fecef52b3ad15e5d2;hb=d431519d61f55af8bd1714d00126c948d888f3a9;hp=bb78bdd2b813b0da53daec3051bde859a5a7fb69;hpb=1960f28c0bf75b16e88460d6135058fd93202322;p=jquery.git diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index bb78bdd..c250b53 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -828,9 +828,9 @@ var testHtml = function(valueObj) { equals( $div.html(valueObj( 0 )).html(), '0', 'Setting a zero as html' ); var $div2 = jQuery('
'), insert = "<div>hello1</div>"; - equals( $div2.html(insert).html(), insert, "Verify escaped insertion." ); - equals( $div2.html("x" + insert).html(), "x" + insert, "Verify escaped insertion." ); - equals( $div2.html(" " + insert).html(), " " + insert, "Verify escaped insertion." ); + equals( $div2.html(insert).html().replace(/>/g, ">"), insert, "Verify escaped insertion." ); + equals( $div2.html("x" + insert).html().replace(/>/g, ">"), "x" + insert, "Verify escaped insertion." ); + equals( $div2.html(" " + insert).html().replace(/>/g, ">"), " " + insert, "Verify escaped insertion." ); var map = jQuery("").html(valueObj("jQuery")); @@ -908,17 +908,17 @@ test("html(Function) with incoming value", function() { equals( $div2.html(function(i, val) { equals( val, "", "Make sure the incoming value is correct." ); return insert; - }).html(), insert, "Verify escaped insertion." ); + }).html().replace(/>/g, ">"), insert, "Verify escaped insertion." ); equals( $div2.html(function(i, val) { - equals( val, insert, "Make sure the incoming value is correct." ); + equals( val.replace(/>/g, ">"), insert, "Make sure the incoming value is correct." ); return "x" + insert; - }).html(), "x" + insert, "Verify escaped insertion." ); + }).html().replace(/>/g, ">"), "x" + insert, "Verify escaped insertion." ); equals( $div2.html(function(i, val) { - equals( val, "x" + insert, "Make sure the incoming value is correct." ); + equals( val.replace(/>/g, ">"), "x" + insert, "Make sure the incoming value is correct." ); return " " + insert; - }).html(), " " + insert, "Verify escaped insertion." ); + }).html().replace(/>/g, ">"), " " + insert, "Verify escaped insertion." ); }); var testRemove = function(method) {