3 * template_lite {strip}{/strip} block plugin
7 * Purpose: strip unwanted white space from text
8 * Credit: Taken from the original Smarty
9 * http://smarty.php.net
11 function tpl_block_strip($params, $content, &$tpl)
13 $_strip_search = array(
14 "![\t ]+$|^[\t ]+!m", // remove leading/trailing space chars
15 '%[\r\n]+%m', // remove CRs and newlines
17 $_strip_replace = array(
21 return preg_replace($_strip_search, $_strip_replace, $content);