Okay, I have this big problem with CKEditor. I add some CSS to my tags as I'm creating content and CKEditor will turn perfectly fine CSS into, I don't know what. For example.
This:
<div style="margin: 0px auto; background-image: url("http://cas.ncat.edu/cas/ckfinder/userfiles/images/ConvergeSouth/banner.png"); width: 960px; height: 189px;">
Becomes:
<div banner.png="" cas="" cas.ncat.edu="" ckfinder="" convergesouth="" height:="" http:="" images="" style="margin: 0px auto;" userfiles="" width:="">
Note, CKEditor is what adds the " to my background-image: url() directive. This is more then annoying and I've not made ANY changes to the CKEditor files.
What is causing this, what can be done to fix it? Am *I* doing something incorrect? Any help will be greatly appreciated.
Note, if I go into my database and paste in the proper code it'll load up in CKEditor fine, the first time. CKEditor will show my bg images, etc. but when I save it back to the database, CKEditor nukes my CSS and makes it look like what I showed. If I create the page USING CKEditor, save it to the database, it works fine, till I load it again. Once I load it in CKEditor a second time, to make changes, etc., it screws up my CSS.
I've used mysql_real_escape_string() and addslashes() to see if it could be the way I'm escaping my content to add to the database, but both methods are giving me the same messed up results. So I'm assuming it's something with CKEditor.
Re: Big Issue with CKEditor
Re: Big Issue with CKEditor
It's kind of a big problem and one that definitely needs to be addressed or told that we're doing something wrong or have a switch turned off somewhere that we need turned on. I'm not ruling out it could be something on my end, maybe an option that needs to be enabled that isn't exactly highlighted in CKEditor's information or something they forgot to add to the help file.
Hopefully someone can give us some insight into the issue!
Re: Big Issue with CKEditor
Simple, huh? Anyway, I'm replacing the " with ' and forcing CKEditor to re-parse the file. Now when I load the data up, CKEditor will once again replace ' with " HOWEVER, CKEditor won't break the CSS. Pretty much I'm fooling CKEditor into thinking it hasn't replaced it yet and it replaces it again.
A quick fix till they come out with something a little more permanent. I hope this helps some other people!