From: John Resig Date: Mon, 22 Jan 2007 03:25:00 +0000 (+0000) Subject: Fixed this issue: $("
foo\nbar
"); X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=34c0bed54a5ad812b1f78a85529164e0085f50d7 Fixed this issue: $("
foo\nbar
"); --- diff --git a/src/jquery/jquery.js b/src/jquery/jquery.js index 38253c1..f4d2ef7 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 = /^[^<]*(<.+>)[^>]*$/.exec(a); + var m = /^[^<]*(<(.|\n)+>)[^>]*$/.exec(a); if ( m ) a = jQuery.clean( [ m[1] ] ); @@ -1219,6 +1219,7 @@ jQuery.extend({ noConflict: function() { if ( jQuery._$ ) $ = jQuery._$; + return jQuery; }, // This may seem like some crazy code, but trust me when I say that this