mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Fixed #874
This commit is contained in:
parent
a82b048db8
commit
d4849a0d35
3
src/jquery/coreTest.js
vendored
3
src/jquery/coreTest.js
vendored
@ -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
|
||||
$('<p>\r\n</p>');
|
||||
});
|
||||
|
||||
test("length", function() {
|
||||
|
2
src/jquery/jquery.js
vendored
2
src/jquery/jquery.js
vendored
@ -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] ] );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user