Source for file shared.escape_special_chars.php
Documentation is available at shared.escape_special_chars.php
* escape_special_chars common function
* Function: smarty_function_escape_special_chars<br>
* Purpose: used by other smarty functions to escape
* special chars except for already escaped ones
* @author Monte Ohrt <monte at ohrt dot com>
$string =
preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
$string =
str_replace(array('%%%SMARTY_START%%%','%%%SMARTY_END%%%'), array('&',';'), $string);
/* vim: set expandtab: */
Documentation generated on Sun, 09 Mar 2008 23:53:01 -0300 by phpDocumentor 1.4.0