]> source.dussan.org Git - jquery.git/commitdiff
jquery core: Allowing whitespaces within the [6026] addition.
authorAriel Flesler <aflesler@gmail.com>
Sun, 4 Jan 2009 21:09:03 +0000 (21:09 +0000)
committerAriel Flesler <aflesler@gmail.com>
Sun, 4 Jan 2009 21:09:03 +0000 (21:09 +0000)
src/core.js

index 8c4c09b460682ad02c52d21d9c0def35b7956358..9330dd7226dc6afd35ef91e7ce12b250f40b2090 100644 (file)
@@ -825,7 +825,7 @@ jQuery.extend({
                // If a single string is passed in and it's a single tag
                // just do a createElement and skip the rest
                if ( !fragment && elems.length === 1 && typeof elems[0] === "string" ) {
-                       var match = /^<(\w+)\/?>$/.exec(elems[0]);
+                       var match = /^<(\w+)\s*\/?>$/.exec(elems[0]);
                        if ( match )
                                return [ context.createElement( match[1] ) ];
                }