Kohana 2.x kotidy – Using the Tidy library to clean up Kohana’s HTML output


In a quick followup to yesterday’s building and releasing autoasset, I’ve created another module to do something simple and portable for Kohana 2.x. This module, kotidy, uses the PHP Tidy library to clean up the HTML output immediately prior to display. Even though the HTML is not seen by the end user, I find myself OCD about this kind of stuff and want to know that my source code is clean, even if most people will never see it.

Just like autoasset, kotidy uses the Event system to hook a basic function in place to use the tidy library to clean up the output. Other than adding this module to your module list in the main config file, no work is required on your part, unless you want to customize the config data being sent to Tidy::parseString(), of course.

Download Kohana 2.x – kotidy

, ,

  1. No comments yet.
(will not be published)