/** * * Uses the tidy library to tidy HTML output. * * @access public * * @param string $buffer The source text to be filtered. * */ public function filter($buffer) { $tidy = new tidy(); $config = array('indent' => true, 'output-xhtml' => true, 'wrap' => 200); $tidy->parseString($buffer, $config); $tidy->cleanRepair(); return $tidy->get_output(); }