Make sure that a DOM node isn't getting passed through (as is the case in IE, it...
[jquery.git] / src / core.js
index bdc6b2f..e2d3b60 100644 (file)
@@ -32,7 +32,7 @@ var jQuery = function( selector, context ) {
        rtrim = /(\s|\u00A0)+|(\s|\u00A0)+$/g,
 
        // Match a standalone tag
-       rsingleTag = /<(\w+)\s*\/?>(?:<\/\1>)?$/,
+       rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
 
        // Keep a UserAgent string for use with jQuery.browser
        userAgent = navigator.userAgent.toLowerCase(),
@@ -315,7 +315,7 @@ jQuery.extend({
        },
 
        isObjectLiteral: function( obj ) {
-               if ( toString.call(obj) !== "[object Object]" ) {
+               if ( toString.call(obj) !== "[object Object]" || typeof obj.nodeType === "number" ) {
                        return false;
                }