Hi,
when I get the content of the editor via the post method, I notice that double quote, &, > and < are encoded to " or & ... but the single quote is not encoded. I'd like to have it encoded too. Of course I could a dirty search and replace in the output but I'd rather do this nicely and change what has to be changed at the right place. If anyone knows where to do the change, I'd appreciate it...
PS : I use PHP 4.
thanks in advance
when I get the content of the editor via the post method, I notice that double quote, &, > and < are encoded to " or & ... but the single quote is not encoded. I'd like to have it encoded too. Of course I could a dirty search and replace in the output but I'd rather do this nicely and change what has to be changed at the right place. If anyone knows where to do the change, I'd appreciate it...
PS : I use PHP 4.
thanks in advance
Re: single quote not encoded
You are probalby using htmlspecialchars to encode HTML tags, check PHP manual for ENT_QUOTES option.
http://php.net/manual/en/function.htmlspecialchars.php
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: single quote not encoded
I've solved the problem. it was not a php issue but a JS issue as it is JS that transfroms special html characters.
I simply add a new transformation rule in fckeditor\editor\js\fckeditorcode_gecko.js and fckeditorcode_ie.js that reads : "'":"#039". I added this next to '"':'quot' in the files.
hope this can help somone else some day
Re: single quote not encoded
Works!
Don't know why or how this got in there...
You could also use:
"'":"apos",
instead for clarity?
Regards.
C.
Re: single quote not encoded
Note that ' is only valid in XML and XHTML, but not in HTML.
Re: single quote not encoded
so why if double quotes get encoded in fckeditor, single quotes aren't? Thanks for remembering me of apos not being html.
Regards,
Chris.
same problem i am not getting where u added #039
Dear Benkunz,
Basic environment is JSP technology.
I am also using fck editor in my application as you said i need more clarity on this because there are so much confusing in JS because of long code (fckeditorcode_geko.js and ie.js) kindly give me some idea on it.
One more can you tell me how to upload image in fckeditor.
Thanks, Arun