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
$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 Mon, 25 Jun 2007 14:05:19 -0400 by phpDocumentor 1.3.2. PEAR Logo Copyright © PHP Group 2004.
|