This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php function sanitize_page($buffer) { | |
$search = array('/\>[^\S ]+/s', '/[^\S ]+\</s', '/(\s)+/s'); | |
$replace = array('>', '<', '\\1'); | |
$buffer = preg_replace($search, $replace, $buffer); | |
function gzip_doc($buffer) { if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) { return ob_gzhandler($buffer, 5); } else { return $buffer; }} | |
return gzip_doc($buffer); | |
} ?> |