Skip to content
Permalink
Browse files
Fixed this issue: $("<div>foo\nbar</div>");
  • Loading branch information
jeresig committed Jan 22, 2007
1 parent 6c07245 commit 34c0bed54a5ad812b1f78a85529164e0085f50d7
Showing with 2 additions and 1 deletion.
  1. +2 −1 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

0 comments on commit 34c0bed

Please sign in to comment.