title: Sending html to Javascript from PHP via JSON obejct
body: <p>I'm sending some data from php through ajax to jquery.</p>
  
  <p>If <code>$content="ABC";</code> everything is OK. I get alert with ABC.</p>
  
  <p>If <code>$content="&lt;div&gt;ABC&lt;/div&gt;";</code> then Houston has a problem. Nothing happens at all.</p>
  
  <p>Here is PHP code</p>
  
  <pre><code>$json = json_encode(array("content" =&gt; $content));
  echo $json;
  </code></pre>
  
  <p>And this is Jquery</p>
  
  <pre><code> $('#'+pic_type+'_form_n_'+pic_number).ajaxSubmit({
   success: function(responseimage){
   result = jQuery.parseJSON(responseimage);
   alert(result.content);
  </code></pre>
  
  <p>Any ideas ?</p>
  
  <p><strong>UPDATE!</strong>
  I've removed <code>jQuery.parseJSON</code>
  so that line has only this code </p>
  
  <p><code>result = responseimage;</code></p>
  
  <p>And now I get the result in alert.
  The result is the following</p>
  
  <pre><code>{"content":".&lt;div&gt;ABC&amp;lt;\/div&amp;gt;."}&lt;/div&gt;
  </code></pre>
  
  <p>So we can see that JSON is not created well. I;ve tried  utf8_encode and trim , but they do nothing to the result. result is strange.</p>