Added a fix for bug #1489, appending <caption> was broken.
[jquery.git] / src / jquery / jquery.js
index 07588ba..94f099b 100644 (file)
@@ -1566,7 +1566,7 @@ jQuery.extend({
                                        !s.indexOf("<leg") &&
                                        [1, "<fieldset>", "</fieldset>"] ||
                                        
-                                       (!s.indexOf("<thead") || !s.indexOf("<tbody") || !s.indexOf("<tfoot") || !s.indexOf("<colg")) &&
+                                       s.match(/^<(thead|tbody|tfoot|colg|cap)/) &&
                                        [1, "<table>", "</table>"] ||
                                        
                                        !s.indexOf("<tr") &&