title: html is not properly updating using ckeditor
body: <p>I updating html using ckeditor and php. but when i update some html is misplaced.</p>
  
  <p>Updating</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;nav class="container"&gt;
      &lt;span class="cd-marker item-1"&gt;&lt;/span&gt;
      
      &lt;ul&gt;
          &lt;li class="selected"&gt;&lt;a href="#0"&gt;&lt;div class="slide-number"&gt;1&lt;/div&gt; Money Care&lt;span&gt;Finding your Next Advisor&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#0"&gt;&lt;div class="slide-number"&gt;2&lt;/div&gt; Friendly Assistance&lt;span&gt;Export Financial Advice&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#0"&gt;&lt;div class="slide-number"&gt;3&lt;/div&gt; Our Experience&lt;span&gt;We have 15 Years Experience&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#0"&gt;&lt;div class="slide-number"&gt;4&lt;/div&gt; Client Investment&lt;span&gt;Doing the right thing&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/nav&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>After update i got output like</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;nav class="container"&gt;
      &lt;ul&gt;
          &lt;li class="selected"&gt;
          &lt;div class="slide-number"&gt;&lt;a href="#0"&gt;1&lt;/a&gt;&lt;/div&gt;
          &lt;a href="#0"&gt;Money Care&lt;span&gt;Finding your Next Advisor&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;
          &lt;div class="slide-number"&gt;&lt;a href="#0"&gt;2&lt;/a&gt;&lt;/div&gt;
          &lt;a href="#0"&gt;Friendly Assistance&lt;span&gt;Export Financial Advice&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;
          &lt;div class="slide-number"&gt;&lt;a href="#0"&gt;3&lt;/a&gt;&lt;/div&gt;
          &lt;a href="#0"&gt;Our Experience&lt;span&gt;We have 15 Years Experience&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;
          &lt;div class="slide-number"&gt;&lt;a href="#0"&gt;4&lt;/a&gt;&lt;/div&gt;
          &lt;a href="#0"&gt;Client Investment&lt;span&gt;Doing the right thing&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;/nav&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Please notice that line</p>
  
  <pre><code>&lt;div class="slide-number"&gt;
  </code></pre>
  
  <p>jumped before tag.</p>
  
  <pre><code> &lt;a&gt; 
  </code></pre>
  
  <p>this issue also arise when i use tinymce instead of ckeditor.
  I couldn't find any solution anywhere on the net.
  Please provide suggestion what could get wrong with editor.</p>