Skip to content

Commit

Permalink
Fixed issue with comment text being included in .text() results.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed Aug 31, 2006
1 parent a4ec609 commit 78a7cf6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/jquery/jquery.js
Expand Up @@ -378,8 +378,9 @@ jQuery.fn = jQuery.prototype = {
for ( var j = 0; j < e.length; j++ ) {
var r = e[j].childNodes;
for ( var i = 0; i < r.length; i++ )
t += r[i].nodeType != 1 ?
r[i].nodeValue : jQuery.fn.text([ r[i] ]);
if ( r[i].nodeType != 8 )
t += r[i].nodeType != 1 ?
r[i].nodeValue : jQuery.fn.text([ r[i] ]);
}
return t;
},
Expand Down

0 comments on commit 78a7cf6

Please sign in to comment.