$(someelement).text().length and counting character encodings?
<p>Lets say I have this.</p>

<pre><code>&lt;div id="somediv"&gt; 
hello, my friend&amp;#39;s &amp;amp; dog are good friends!
&lt;/div&gt;
</code></pre>

<p>I think that <code>$(somediv).text().length</code> 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 <code>&amp;amp;</code> (instead of &amp; ), how do I properly count the total text in a <code>div</code> in its rendered view, not encoded view?</p>
