I am using codesample plugin of tinymce which is mentioned here <https://www.tinymce.com/docs/plugins/codesample/> in my custom portal.

Everything works fine, until, I have to "re-edit" the data stored in database.

When i go to edit, all data stored in database within

```
<pre><code>&lt;html&gt; &lt;p&gt;Text&lt;/p&gt; &lt;/html&gt; </code></pre>

```

is stripped and shown as only

```
<pre><code>Text </code></pre>

```

when viewed from "Tools > Source"

I am already using "htmlentities" in my textarea like :-

`<textarea><?php echo htmlentities($content); ?></textarea>`

It still strips all html tag used inside the tag created by `codesample` plugin.

FAQ :
1. When adding data for the first time everything works fine.
2. Problem is only when i go to edit page. Tinymce strips only HTML code from `codesample` plugin. Rest all code that has been added using codesample like "css,python,php" etc., are displayed in editor.