Hi,
I’ve developed a plugin ( Clean HTML ) for myself to clean dirty html code or truncated html code that compitable with EE 2.x. Want to share with you guys if that can help.
This come with three parser. HTML Purifier, Tidy and custom
HTML Purifier - http://htmlpurifier.org/
HTML Tidy - http://www.w3.org/People/Raggett/tidy/, you server must have this support
custom - native dirty html cleaning method
From all of this, HTML Purifier is little slower than other but it works great, also need the library files with the plugin. HTML Tidy is little faster than HTML Purifier but your server must have the php tidy package. Custom is faster than all other but i need to improve this more.
Parameters:
engine - tidy/purifier/custom. Which library want to use. Default value is purifier.
excerpt_size - Optional. To truncate suppplied string to specific number of words.
To use this plugin, wrap anything you want to be processed by it between these tag pairs:
{exp:clean_html excerpt="90" engine="tidy"}
text and html code you want to clean
{/exp:clean_html}Sourcecode at github.
git://github.com/appskitchen/ak.clean_html.ee2_addon.gitDevot:ee link - Clean HTML Plugin
Your feedback is appreciated.
Thanks
Musa