title: JQuery ajax php post problem
body: <p>This may sound strange but I have a JQ/AJAX/PHP post problem.</p>
  
  <p>My "code" is all there and works in most situations except 1 - when I try to pass a  tag through the process.</p>
  
  <p>I grab the html like this</p>
  
  <pre><code>var ed = $('#fraRTE').contents().find('body #editarea').html(); 
  </code></pre>
  
  <p><code>#fraRTE</code> is an iframe width an editable div <code>#editarea</code> hence <code>.contents().find('body #editarea').html()</code></p>
  
  <p>So if <code>var ed</code> is just "hello world etc...." there is no problem and the data is processed BUT if <code>var ed</code> is something like "hello world etc.... <code>&lt;img src="image.png"&gt;</code>" the data is not processed - stangely if <code>var ed</code> is "hello world etc....<code>&lt;img src="image.png"&gt;</code>" - no gap between text and the image the data is actually processed.</p>
  
  <p>If I <code>alert(ed)</code> before the post then I see the "correct" string - whatever it's contents, post like this:</p>
  
  <pre><code>var data = 'content='+ed;
  $.ajax({ 
  type: 'post', 
  url:  'script.php',
  data: data,
  success: function(msg) { 
  alert(msg);
  }
  </code></pre>
  
  <p>});</p>
  
  <p>I create the data string before "data:data" as there are a few more items in the string.</p>
  
  <p>my <code>alert(msg)</code> is set by <code>echo $_POST['content'];</code> on <code>script.php</code></p>
  
  <p>the alert(msg) tells me what has (or has not) been posted to the DB. this is where I see the problem mentioned above. i.e. the inclusion (or not) of <code>&lt;img...&gt;</code></p>
  
  <p>Suggestions please</p>