Lets say I have this.
<div id="somediv">
hello, my friend's & dog are good friends!
</div>
I think that $(somediv).text().length
is counting the encodings and not the rendered view. I am doing some truncating on a string if it's too long, and because some of the strings (dynamic) could have &
(instead of & ), how do I properly count the total text in a div
in its rendered view, not encoded view?