| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 
 | 	public function _initCompress()
	{
 
		$i = array('/>[^S ]+/s','/[^S ]+</s','/(s)+/s');
		$ii = array('>','<','1');
		return preg_replace($i, $ii, $compress);
 
		 function sanitize_output($buffer)
		 {
		$search = array(
				'/\>[^\S ]+/s', //strip whitespaces after tags, except space
				'/[^\S ]+\</s', //strip whitespaces before tags, except space
				'/(\s)+/s'  // shorten multiple whitespace sequences
		);
		$replace = array(
				'>',
				'<',
				'\\1'
		);
		$buffer = preg_replace($search, $replace, $buffer);
		return $buffer;
		}
 
		//ob_end_flush();
		//ob_start('compress_html');*/
 
		ob_start("sanitize_output");
 
	} | 
Partager