Iam using a Tinymce setup that only uses emoticons for a small reply section on my website. The js plugin itself works fine and is visible within the editor but when it save to the database it shows it as:
<img src=\"/subdir/includes/tinymce/plugins/emoticons/img/smiley-kiss.gif\" alt=\"kiss\" />
The \ is nowhere to be found in my code, it starts and ends with it. Strangely is also does this with the alt of the image. These are the tinymce settings iam using:
<script type="text/javascript" src="includes/tinymce/tinymce.js"></script>
<script type="text/javascript">
tinymce.init({
selector: "textarea",
theme: "modern",
plugins: ["emoticons"],
toolbar1: "emoticons",
menubar : false,
height : 100,
forced_root_block : false,
relative_urls : false,
});
</script>
Does anyone have a clue where this might go wrong? I've searched for the backward slash in the plugin files of emoticons but cannot find anything related to this.
For those who have the same issue, this has todo with prepared statements, normal inserts using mysqli give no such errors. before you enter the textarea data from ckeditor into the database using prepared statements you should use striplashes!