Filter to strip comments?

From: Date: Wed, 19 Feb 2003 14:27:16 +0000
Subject: Filter to strip comments?
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7873@lists.php.net to get a copy of this message
Has anyone written an plugin to strip <!-- html style comments --> from the final output? Something like this maybe? (which doesn't work btw, not very good at regex!) function remove_comments($source, &$smarty) { return preg_replace("/<!--.*-->/U","",$source); } Cheers, Tom

« previous php.smarty.general (#7873) next »