I found this great tool today (
http://htmlpurifier.org) which will clean up html code.
I thought this would be a great idea to implement on one of my sites.
I know how to do it via templates and snippets but thought that would be a performance drain some certain aspects of the site are not cached (for multiple page stories) and would be unrealistic to reprocess and clean the html on each page view.
I figured there has to be a way to do this before the content is saved to the manager. Typically items in the manager are not touched more then once or twice so it would be nice to have the clean data stored in the database. I currently use TinyMCE.
I think this can be done with a module or a plugin but don’t know how to intercept the data before it is saved to the database.
Can anyone shed some light or provide some guidance on the subject? (maybe point me to a module/plugin that modifies content before a save that I can dissect?)
Thanks in advance
-Brian