equals( $div.html(valueObj( 0 )).html(), '0', 'Setting a zero as html' );
var $div2 = jQuery('<div/>'), 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("<map/>").html(valueObj("<area id='map01' shape='rect' coords='50,50,150,150' href='http://www.jquery.com/' alt='jQuery'>"));
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) {