} elseif (!in_array($cleanedXML[strlen($cleanedXML) - 1], array("\n", $this->indentBy[strlen($this->indentBy) - 1])) || !in_array($xml[$char], array("\r", "\n", "\t", " "))) { $cleanedXML .= $xml[$char]; } } } $this->cleanedHash = md5($xml); $this->cleanedXML = $xml; // Return! return $cleanedXML; } /** * Prints $indentation $indentLevel times * @return string indentstring * @param int $indentLevel * @param string $indentation */ private function getIndentation($indentLevel, $indentation) { $out = ''; for ($i = 0; $i < $indentLevel; $i++) { $out .= $indentation; } return $out; } } $lezaz->listen('output.filter', function ($output, $filtered) { $output = empty($filtered) ? $output : $filtered; $clean_html = new CleanOutput(); //return $output; return $clean_html->clean($output); });