Hid an issue where Safari through an exception when a colgroup was created in jQuery...
[jquery.git] / src / core.js
index b5de145..2688a46 100644 (file)
@@ -24,7 +24,7 @@ var jQuery = window.jQuery = window.$ = function( selector, context ) {
 var quickExpr = /^[^<]*(<(.|\s)+>)[^>]*$|^#([\w-]+)$/,
 
 // Is it a simple selector
-       isSimple = /^.[^:#\[\.]*$/,
+       isSimple = /^.[^:#\[\.,]*$/,
 
 // Will speed up references to undefined, and allows munging its name.
        undefined;
@@ -916,7 +916,10 @@ jQuery.extend({
                });
 
                // Clean up
-               div.innerHTML = "";
+               // Safari 3.1 throws an exception when a colgroup is created
+               try {
+                       div.innerHTML = "";
+               } catch(e){}
                
                if ( fragment ) {
                        for ( var i = 0; ret[i]; i++ ) {