From 83c75321619f9968e4373a13aced5f83d4228962 Mon Sep 17 00:00:00 2001
From: John Resig <jeresig@gmail.com>
Date: Tue, 13 Jun 2006 02:20:15 +0000
Subject: [PATCH] Fixed appending rows to a table.

---
 jquery/jquery.js |    8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/jquery/jquery.js b/jquery/jquery.js
index 9f35e1a..b6738a8 100644
--- a/jquery/jquery.js
+++ b/jquery/jquery.js
@@ -387,8 +387,16 @@ $.clean = function(a) {
 	var r = [];
 	for ( var i = 0; i < a.length; i++ ) {
 		if ( a[i].constructor == String ) {
+			if ( a[i].indexOf("<tr") == 0 ) {
+//alert("tr");
+				var tr = true;
+				a[i] = "<table>" + a[i] + "</table>";
+			}
 			var div = document.createElement("div");
 			div.innerHTML = a[i];
+			if ( tr ) {
+				div = div.firstChild.firstChild;
+			}
 			for ( var j = 0; j < div.childNodes.length; j++ ) {
 				r[r.length] = div.childNodes[j];
 			}
-- 
1.7.10.4