Hi there,
I'm having a couple of really frustrating problems that may or may not be linked:
1) Fck editor seems to add heaps of <br /> tags to its content. And when I edit the content and re-submit, the <br /> tags seem to double.
2) All the css styles are being stripped - I tested this by exiting the script and echoing the output onto the page. For example <ul class="red"> gets converted to <ul>, and <span style=""> gest converted to <span>. Also, all the line breaks (when I press enter) are converted to <p>?</p>.
Any help would be greatly appreciated
Thanks,
Dave
Sun, 09/07/2008 - 08:46
#1
Re: extra linebreaks and formatting stripped - please help
Re: extra linebreaks and formatting stripped - please help
The real problem now is that it doesn't output any styles, or any tag attibutes - eg <a href="www.test.com"> becomes <a> and <span style=""> becomes <span>. This seems to be a direct output from fckeditor, as this happens before any interaction with the DB. Any ideas why this is happening?
Re: extra linebreaks and formatting stripped - please help
Thanks in advance,
Dave
Re: extra linebreaks and formatting stripped - please help
Use a debugging proxy to see what gets submitted. If you see custom styles gone in the request, it's something in the browser that does this. Otherwise, it's the server. Here's a good one: http://www.charlesproxy.com/.
Re: extra linebreaks and formatting stripped - please help
Also noticed that while usually only tag attributes are removed, <h3> tags are removed entirely.
Thanks,
Dave
Re: extra linebreaks and formatting stripped - please help
Problem solved! Well, nearly. Turns out an included file inside an included file in the header was stripping out certain things from certain field names, and my fckeditor field just happened to have the same name as one of those fields..

Anyway thanks A.M (and Charles) for your help