Perhaps not strictly a php question - but I can't find anything on this and thought you guys might be able to help.

I am using a CMS which has FCKeditor built into it. Just recently (I didn't change the configuraation or server or anything) its started escaping all my code meaning the page won't function properly. ie if I try to code a link then it saves as something like

<a href=\\\"page.html\\\"

I have been through my php escaping strings and slashes - and have also been through fckconfig.js but it keeps doing this. Any ideas?

I've devised a work around for this by tweaking the frot end to display

stripslashes(htmlspecialchars_decode($Content))

instead of $Content. There should be a way to stop the editor doing this in first place though!

Can you provide which CMS you are using, or any code you are using to process the data submitted in your FCKeditor form? The issue is probably due to something with one (or both) of those two things, especially if your CMS (or one of its plugins) was updated recently.

Have you tried outputting the text immediately after it has been submitted to your form handler? That could help in figuring out whether it actually is FCKeditor that is escaping tags, or if there is some code involved in processing that is doing it.

Member Avatar for diafol

Is it FCKEditor or the newer, nicer-sounding CKEditor?

Thanks for the replies, its a bespoke PHP system I use so shouldn't have changed - and it FCKeditor, which makes it harder to find support (I guess we will upgrade at some point. Having gone throught the code again, it does seem that the code is comming out correctly from the editor, so I guess its some security thing on the server. Im on a shared hosting account, and I have noticed with other sites that sendmail() stopped working. Ah well, I guess I'll just stick with the chars_decode function.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.