title: How do I replace unicode character u00A0 with a space in javascript?
body: <p>I'm looking to replace a bad character that a content editable div uses when a space is added at the end of the input.</p>
  
  <p>Here is what I've tried</p>
  
  <pre><code>var text = $(this).text();
  text.replace(/\u00A0/, " ");
  </code></pre>
  
  <p>But when I check the value of the last character like this</p>
  
  <pre><code>text.charCodeAt(text.length-1)
  </code></pre>
  
  <p>The value is still 160 instead of 32</p>