I've been developing a site for a friend, and I've used FCKEditor for the end user to manage misc content on his site... Content is stored in a MySQL DB.
I use XAMPP for testing it on my machine, and everythings works GREAT! PERFECTO!!
However, when I upload it to their webserver, all HTML entities in the HTML (not content but the tag's themselves) get escaped, hence < etc. Quotes, Double Quotes, etc are also escaped. My first thought was that it was php's MAGIC_QUOTES, however I have it disabled in the .htaccess. After further investigation, I also realised that magic quotes does NOT escape html entities, just quotes etc.
I've played with all the settings int he config, with no luck.
I have a temporary fix so that he can manage his site meanwhile I find a correct fix, hence:
$value = stripslashes(html_entity_decode($_POST['fckeditor']));
Does anyone have a suggestion? I've had this problem for over a week now, and I'm usually very good at trouble shooting... I've yet to even find a hint (in my mind) as to what is causing the entities to be escaped. I'm asuming it is something on the host considering it works hosted off of my computer, PLZ HELP!!
DESPERATE DEVELOPER!!
I use XAMPP for testing it on my machine, and everythings works GREAT! PERFECTO!!
However, when I upload it to their webserver, all HTML entities in the HTML (not content but the tag's themselves) get escaped, hence < etc. Quotes, Double Quotes, etc are also escaped. My first thought was that it was php's MAGIC_QUOTES, however I have it disabled in the .htaccess. After further investigation, I also realised that magic quotes does NOT escape html entities, just quotes etc.
I've played with all the settings int he config, with no luck.
I have a temporary fix so that he can manage his site meanwhile I find a correct fix, hence:
$value = stripslashes(html_entity_decode($_POST['fckeditor']));
Does anyone have a suggestion? I've had this problem for over a week now, and I'm usually very good at trouble shooting... I've yet to even find a hint (in my mind) as to what is causing the entities to be escaped. I'm asuming it is something on the host considering it works hosted off of my computer, PLZ HELP!!
DESPERATE DEVELOPER!!
Re: HTML Entities being escaped!
It is escaping HTML entities on my end! Strange, because I don't think it was before...
Is there a setting in the config causing this? Or am I just an idiot and didn't notice it before?
I've gone through all the settings on the wiki.fckeditor.net
I don't think that FCKEditor would require you to process the data through something like decode_html, etc
The quotes etc are still being escaped on their server, maybe Magic Quotes is enabled...
Re: HTML Entities being escaped!
Is there something else on the server which may escape these which I may not be aware of? The same code is running on my end as the server, I don't think it is mine affecting it, as the value within $_POST['fckeditor'] is escaped, which comes directly from the editor?
My conclusion is either the editor which the two are running the same configs, or server but I can't figure out what. I'm soo frustrated........ Ready to rip my hair out....
Re: HTML Entities being escaped!
I FINALLY found HtmlEncodeOutput after reviewing fckeditor.js in detail, however it is NOT documented at
http://wiki.fckeditor.net/Developer%27s_Guide/Configuration/Configurations_Settings
sometimes the .js wasn't updating settings as well, cache?
Now to solve what appears to be PHP's magic quotes even though it is disabled...
Re: HTML Entities being escaped!
The stupid host uses something other than apache to process their .htaccess files for PHP5, and it is very limited, apparently applying settings after PHP has already begun executing.
Sry for spamming the forum, not like a single person has helped anyway...