Commit d4849a0d authored by Jörn Zaefferer's avatar Jörn Zaefferer

Fixed #874

parent a82b048d
...@@ -14,6 +14,9 @@ test("Basic requirements", function() { ...@@ -14,6 +14,9 @@ test("Basic requirements", function() {
test("$()", function() { test("$()", function() {
var main = $("#main"); var main = $("#main");
isSet( $("div p", main).get(), q("sndp", "en", "sap"), "Basic selector with jQuery object as context" ); 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() { test("length", function() {
......
...@@ -38,7 +38,7 @@ var jQuery = function(a,c) { ...@@ -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 = /^[^<]*(<(.|\n)+>)[^>]*$/.exec(a); var m = /^[^<]*(<(.|\s)+>)[^>]*$/.exec(a);
if ( m ) if ( m )
a = jQuery.clean( [ m[1] ] ); a = jQuery.clean( [ m[1] ] );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment