title: handling ampersand (&) in input using js
body: <p>This has been asked before but mine is different. I cant rub my head around this. I have a wysiwyg form that is being fetched by jquery and saved by ajax</p>
  
  <pre><code>var content=$('.inputfield').val();
  
  fields='front='+fcarddetails;
   $.ajax({
    method:'POST',
    url:actionpage,
    data:fields,
     beforeSend:function()
     {
   $("#processing").show();
     },
  
    complete:function ()
     {
    $("#processing").hide();  
     },
    success: function(feedback)
      {
      }    etc.
  </code></pre>
  
  <p>When '&amp;' is added to the field, the whole input is messed up. 
  I a have handled all the html escapes, filters and special characters. But the code gets broken even before it reaches php action page. I cant convert '&amp;' to &amp; because it still contains '&amp;'. Please help, problem is in js, not php but you can prove me otherwise. Thanks in advance.</p>