Fixed this issue: $("<div>foo\nbar</div>");
authorJohn Resig <jeresig@gmail.com>
Mon, 22 Jan 2007 03:25:00 +0000 (03:25 +0000)
committerJohn Resig <jeresig@gmail.com>
Mon, 22 Jan 2007 03:25:00 +0000 (03:25 +0000)
src/jquery/jquery.js

index 38253c1..f4d2ef7 100644 (file)
@@ -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