title: Search and replace multiple special characters with jquery
body: <p>Currently this will take the text from the textarea and replace all the characters that are specified in the charMap:</p>
  
  <pre><code>&lt;form&gt;
  &lt;textarea name="text" id="text" style="width:300px; height:200px;"&gt;&lt;/textarea&gt;&lt;br /&gt;
  &lt;input type="button" name="submit" id="submit" value="submit" /&gt;
  &lt;/form&gt;
  
  var charMap = {
      "Å":'x',
      "å":'y',
      "b":'z',
      "c":'f'
  };
  
  $('#submit').click(function() {
  
      var str = $('#text').val();
      var str_array = str.split('');
  
      for( var i = 0, len = str_array.length; i &lt; len; i++ ) {
          str_array[ i ] = charMap[ str_array[ i ] ] || str_array[ i ];
      }
  
      foo = str_array.join('');
      $('#text').val(foo);
  
  });
  </code></pre>
  
  <p>The problem is that it does not recognise the special characters. So it will replace 'b' and 'c' but not '&Aring;' and '&aring;'.</p>
  
  <p>Any ideas?</p>