mirror of
https://github.com/jquery/jquery.git
synced 2026-02-03 00:15:22 -05:00
Fix #13223. Re-allow leading space in HTML. Close gh-1264.
This commit is contained in:
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user