Fix #13223. Re-allow leading space in HTML. Close gh-1264.

This commit is contained in:
Dave Methvin
2013-05-08 21:07:41 -04:00
parent 0135a223f4
commit 00eafdf028
3 changed files with 8 additions and 14 deletions

View File

@@ -33,7 +33,7 @@ test("jQuery()", function() {
div = jQuery("<div/><hr/><code/><b/>"),
exec = false,
lng = "",
expected = 20,
expected = 22,
attrObj = {
"text": "test",
"class": "test2",
@@ -108,6 +108,12 @@ test("jQuery()", function() {
equal( jQuery(document.body).get(0), jQuery("body").get(0), "Test passing an html node to the factory" );
elem = jQuery(" <em>hello</em>")[0];
equal( elem.nodeName.toLowerCase(), "em", "leading space" );
elem = jQuery("\n\n<em>world</em>")[0];
equal( elem.nodeName.toLowerCase(), "em", "leading newlines" );
elem = jQuery("<div/>", attrObj );
if ( jQuery.fn.width ) {