3 * patTemplate StripComments input filter
5 * $Id: StripComments.php 440 2008-03-30 09:00:16Z fishbone $
7 * Will remove all HTML comments.
11 * @author Stephan Schmidt <schst@php.net>
15 * patTemplate StripComments output filter
17 * $Id: StripComments.php 440 2008-03-30 09:00:16Z fishbone $
19 * Will remove all HTML comments.
21 * @package patTemplate
23 * @author Stephan Schmidt <schst@php.net>
25 class patTemplate_InputFilter_StripComments extends patTemplate_InputFilter
34 var $_name = 'StripComments';
41 * @return string data without whitespace
43 function apply( $data )
45 $data = preg_replace( '°<!--.*-->°msU', '', $data );
46 $data = preg_replace( '°/\*.*\*/°msU', '', $data );