Hi,
Apologies if this has been posted before. I used the search and couldn't seem to find anything.
Is there already a pre-built function or class in PHP that will parse HTML code generated by FCKEditor and fix bugs? For example, remove stupid formatting (e.g. <font> tags), etc.
I use FCKEditor for my CMS's to edit content areas of pages. These generally only include headings, paragraphs, lists, images, etc. FCKEditor a lot of the time throws in code that is not needed and generally screws up our clean code. For example, <font> tags, classes, styles, etc.
I need a function or class written in PHP to parse the code from FCKEditor to remove things not needed.
If there isn't one, fair enough, I will just write one myself. I'm just hoping one already exists!
Thank you.
Apologies if this has been posted before. I used the search and couldn't seem to find anything.
Is there already a pre-built function or class in PHP that will parse HTML code generated by FCKEditor and fix bugs? For example, remove stupid formatting (e.g. <font> tags), etc.
I use FCKEditor for my CMS's to edit content areas of pages. These generally only include headings, paragraphs, lists, images, etc. FCKEditor a lot of the time throws in code that is not needed and generally screws up our clean code. For example, <font> tags, classes, styles, etc.
I need a function or class written in PHP to parse the code from FCKEditor to remove things not needed.
If there isn't one, fair enough, I will just write one myself. I'm just hoping one already exists!
Thank you.

Re: HTML Clean UP in PHP?
Re: HTML Clean UP in PHP?
As much as I keep on telling her to type it in directly she refuses. She won't even use the Paste from Word option.
Looks like I'll write my own! I'll post it here when I do it next week.
Re: HTML Clean UP in PHP?
W3C
Re: HTML Clean UP in PHP?
http://phpclasses.toperz.pl/browse/package/2189.html
Re: HTML Clean UP in PHP?
Re: HTML Clean UP in PHP?
Re: HTML Clean UP in PHP?
Yes, of course. Simplify adjust the HTML.Allowed configuration in HTML Purifier and only allow HTML tags and attributes you want. (Disclaimer: I wrote HTML Purifier)
Re: HTML Clean UP in PHP?
Re: HTML Clean UP in PHP?
http://www.php.net/tidy
http://tidy.sourceforge.net/docs/quickref.html
http://tidy.sourceforge.net/docs/quickref.html