diff --git a/jquery/jquery.js b/jquery/jquery.js
index fafed0ea..9cf69410 100644
--- a/jquery/jquery.js
+++ b/jquery/jquery.js
@@ -408,15 +408,25 @@ $.clean = function(a) {
var r = [];
for ( var i = 0; i < a.length; i++ ) {
if ( a[i].constructor == String ) {
- if ( a[i].indexOf("
" + a[i] + "";
+ } else if ( !a[i].indexOf(" |
" + a[i] + "
";
}
+
var div = document.createElement("div");
div.innerHTML = a[i];
- if ( tr ) {
+
+ if ( tr || td ) {
div = div.firstChild.firstChild;
+ if ( td ) {
+ div = div.firstChild;
+ }
}
+
for ( var j = 0; j < div.childNodes.length; j++ ) {
r[r.length] = div.childNodes[j];
}