mirror of
https://github.com/jquery/jquery.git
synced 2025-01-10 18:24:24 +00:00
Fixed issue with comment text being included in .text() results.
This commit is contained in:
parent
a4ec609b6a
commit
78a7cf63f6
5
src/jquery/jquery.js
vendored
5
src/jquery/jquery.js
vendored
@ -378,8 +378,9 @@ jQuery.fn = jQuery.prototype = {
|
|||||||
for ( var j = 0; j < e.length; j++ ) {
|
for ( var j = 0; j < e.length; j++ ) {
|
||||||
var r = e[j].childNodes;
|
var r = e[j].childNodes;
|
||||||
for ( var i = 0; i < r.length; i++ )
|
for ( var i = 0; i < r.length; i++ )
|
||||||
t += r[i].nodeType != 1 ?
|
if ( r[i].nodeType != 8 )
|
||||||
r[i].nodeValue : jQuery.fn.text([ r[i] ]);
|
t += r[i].nodeType != 1 ?
|
||||||
|
r[i].nodeValue : jQuery.fn.text([ r[i] ]);
|
||||||
}
|
}
|
||||||
return t;
|
return t;
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user