title: Post Summernote code through Ajax to PHP and then insert into database
body: <p>I have a page with a summernote editor, when the user submits the page I retrieve the code from the editor through jquery and then send it to a php page which will then insert the html into a database. The html which I retrieve from the editor before I send it to the php page is correct, but as soon as it arrives at the php page most of the html is stripped down and incomplete.</p>
  
  <p>This is my Summernote </p>
  
  <pre><code>&lt;div class="summernote" id="decription" name="description"&gt;&lt;/div&gt;
  
  $('.summernote').summernote({
  dialogsInBody: true,
  toolbar: [
   ['style', ['bold', 'italic', 'underline', 'clear']],
   ['font', ['strikethrough']],
   ['fontsize', ['fontsize']],
   ['color', ['color']],
   ['para', ['ul', 'ol', 'paragraph']],
   ['table', ['table']],
   ['height', ['height']],
   ['undo', ['undo']],
   ['redo', ['redo']],
   ['help', ['help']]
  ],
  placeholder: 'Describe the business here',
  tabsize: 2,
  height: 200
  });
  
  $('.dropdown-toggle').dropdown()
  </code></pre>
  
  <p>This is how I get the code from the editor once the user has submitted the page</p>
  
  <pre><code>var description =  $("#decription").summernote('code');
  </code></pre>
  
  <p>I then post this description to my php page to insert the data into the database</p>
  
  <pre><code>var dataString = 'desc=' + description;
  
  alert(dataString); 
    $.ajax({
    type: "POST",
    url: "../scripts/add/addpro.php",
    data: dataString,
    cache: false,
    success: function(html) {
        alert(html);
  }
  });
  </code></pre>
  
  <p>I do an alert before posting to make sure that the code sent to php is everything that is in the editor (just for testing), this is always correct and complete, the code sent to php is everything in the editor.</p>
  
  <p>In my addpro.php page I do the following</p>
  
  <pre><code>$description = $_POST['desc'];
  
  echo $description;
  </code></pre>
  
  <p>The html code echo'd by the php is incomplete and stripped down. Whenever for example there is a comma (,) in the html code, php will only go up to that and skip the rest of the tags and text after that.</p>