Fixed this issue: $("<div>foo\nbar</div>");
This commit is contained in:
parent
6c072457ed
commit
34c0bed54a
1 changed files with 2 additions and 1 deletions
3
src/jquery/jquery.js
vendored
3
src/jquery/jquery.js
vendored
|
@ -38,7 +38,7 @@ var jQuery = function(a,c) {
|
||||||
// Handle HTML strings
|
// Handle HTML strings
|
||||||
if ( typeof a == "string" ) {
|
if ( typeof a == "string" ) {
|
||||||
// HANDLE: $(html) -> $(array)
|
// HANDLE: $(html) -> $(array)
|
||||||
var m = /^[^<]*(<.+>)[^>]*$/.exec(a);
|
var m = /^[^<]*(<(.|\n)+>)[^>]*$/.exec(a);
|
||||||
if ( m )
|
if ( m )
|
||||||
a = jQuery.clean( [ m[1] ] );
|
a = jQuery.clean( [ m[1] ] );
|
||||||
|
|
||||||
|
@ -1219,6 +1219,7 @@ jQuery.extend({
|
||||||
noConflict: function() {
|
noConflict: function() {
|
||||||
if ( jQuery._$ )
|
if ( jQuery._$ )
|
||||||
$ = jQuery._$;
|
$ = jQuery._$;
|
||||||
|
return jQuery;
|
||||||
},
|
},
|
||||||
|
|
||||||
// This may seem like some crazy code, but trust me when I say that this
|
// This may seem like some crazy code, but trust me when I say that this
|
||||||
|
|
Loading…
Reference in a new issue