title: Missing character index of a space from jquery html
body: <p>I'm attempting to find the index of the first space in a string from an element's html.  In a test case where I simply set a <code>test</code> variable and check the <code>indexOf(' ')</code>, it shows up.</p>
  
  <p>For example, the following results in <code>test</code> having a length of 11 characters with the first space at the 5th position, as it should.</p>
  
  <pre><code>var test = 'hello there';
  var idxTest1 = test.indexOf(' ');
  </code></pre>
  
  <p>However, if I set my test variable to a <code>.text()</code> value from a jQuery elements <code>.html()</code>, I'm getting a <code>-1</code> for the index of the space even when <code>test</code> still appears to be equal to <code>'hello there'</code> with a length of 11 characters.</p>
  
  <p>What's going on here?  <a href="http://jsfiddle.net/jhuTB/" rel="nofollow">http://jsfiddle.net/jhuTB/</a></p>