title: Strophe character encoding issue
body: <p>I am working on an XMPP client and having an issue with messages being sent/received by <a href="http://strophe.im/">Strophe</a> (javascript version).</p>
  
  <p>The issue is messages that contain "special" characters. For instance, if I send:</p>
  
  <blockquote>
    <p>I'm here.</p>
  </blockquote>
  
  <p>An external client (i.e. iChat) will display</p>
  
  <blockquote>
    <p>I&ampapos;m here.</p>
  </blockquote>
  
  <p>A strophe client doesn't display anything at all.</p>
  
  <p>If I send that same message from iChat to the strophe client, it displays properly.</p>
  
  <p>Here is the most basic sample code I could come up with:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
    &lt;script type='text/javascript' src='strophe.min.js'&gt;&lt;/script&gt;
    &lt;script type='text/javascript'&gt;
      function onConnect(status) {
          if (status == Strophe.Status.CONNECTED) {
              var message = $msg({to: CONTACT_JID, from: JID, type: 'chat'}).c('body').t("I'm here."); ;
              connection.send(message.tree());
          }
      }
      var connection = new Strophe.Connection('http://bosh.metajack.im:5280/xmpp-httpbind');
      connection.connect(JID, PASS, onConnect);
    &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;&lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Thanks in advance for any help.</p>
  
  <p>Edit:</p>
  
  <p>Outbound, it seems Strophe is double encoding. When I type</p>
  
  <blockquote>
    <p>I'm</p>
  </blockquote>
  
  <p>it is sending</p>
  
  <pre><code>&lt;body&gt;I&amp;amp;apos;m&lt;/body&gt;
  </code></pre>
  
  <p>Inbound, it appears to not be handling CDATA properly. Any guidance or ideas are appreciated.</p>