From d4849a0d3589ea3d369137f79b102eb68403b489 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Wed, 31 Jan 2007 21:48:14 +0000 Subject: [PATCH] Fixed #874 --- src/jquery/coreTest.js | 3 +++ src/jquery/jquery.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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] ] ); -- 1.7.10.4