How to insert backslash (\) in CKEditor so that it can be saved in the database?
<p>I have a very strange problem. I have tried my best to explain it in a better way. Note that I am working in PHP/MySQL. Here is the issue:</p>

<p>I am trying to insert backslash (\) in CKEditor by using escape sequence which will be further saved in the database. I am inserting following piece of code in source view of CKEditor:</p>

<pre><code>&lt;pre&gt;
    &lt;code&gt;
    D:\\Movies\\Hollywood
    &lt;/code&gt;
&lt;/pre&gt;
</code></pre>

<p>The HTML view of CKEditor interprets above code to:</p>

<pre><code>D:\\Movies\\Hollywood
</code></pre>

<p>The above information is saved correctly in the database with no issue because the all backslashes are correctly escaped via escape sequence.</p>

<p>The output on front end comes out to be:</p>

<pre><code>D:\Movies\Hollywood
</code></pre>

<p>But afterwards, a strange issue arises. When I press Enter key by keeping focus on address bar of my browser, the below information:</p>

<pre><code>D:\\Movies\\Hollywood
</code></pre>

<p>automatically changes to</p>

<pre><code>D:\Movies\Hollywood
</code></pre>

<p>It means all the escaped sequences are removed automatically permanently. Now if I go to save the information in the database then obviously it won't be saved to what I exactly wanted. It becomes</p>

<pre><code>D:MoviesHollywood
</code></pre>

<p>Thus the escaped sequences are removed from CKEditor and consequently the backslashes are removed from front end.</p>

<p>Can anyone please explain this phenomenon? Why is it happening so? How can we fix it?</p>