From: Jörn Zaefferer Date: Wed, 31 Jan 2007 21:48:14 +0000 (+0000) Subject: Fixed #874 X-Git-Url: http://git.asbjorn.biz/?a=commitdiff_plain;ds=sidebyside;h=d4849a0d3589ea3d369137f79b102eb68403b489;p=jquery.git Fixed #874 --- diff --git a/src/jquery/coreTest.js b/src/jquery/coreTest.js index 0bb9727..6b73b0c 100644 --- a/src/jquery/coreTest.js +++ b/src/jquery/coreTest.js @@ -14,6 +14,9 @@ test("Basic requirements", function() { test("$()", function() { var main = $("#main"); isSet( $("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" ); + + // make sure this is handled + $('

\r\n

'); }); test("length", function() { diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 76f11d7..e2a2a22 100644 --- a/src/jquery/jquery.js +++ b/src/jquery/jquery.js @@ -38,7 +38,7 @@ var jQuery = function(a,c) { // Handle HTML strings if ( typeof a == "string" ) { // HANDLE: $(html) -> $(array) - var m = /^[^<]*(<(.|\n)+>)[^>]*$/.exec(a); + var m = /^[^<]*(<(.|\s)+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] );