Re: [SMARTY] htmlentities to all assigned variables
| From: | Monte Ohrt | Date: | Wed, 15 Jan 2003 21:07:40 +0000 |
| Subject: | Re: [SMARTY] htmlentities to all assigned variables | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7209@lists.php.net to get a copy of this message | ||
You can use a default modifier to apply a modifier to all vars
implicitly.
$smarty->default_modifiers = array('htmlentities');
On Wed, 2003-01-15 at 11:59, Alex wrote:
> Hi!
> I have a following problem:
> I need to apply htmlentities() function to all assigned variables.
> I know I can use {$AnyVar|escape} but for this I need to remake a huge
> template's files. I tried to find any solution with plugins, but I
> couldn't. Now I have several solution but none of them not looks good.
> For example I can make Smarty child class and overload assign()
> function.
> Anybody have any ideas?
>
> Thanks,
> Alex.
--
Monte Ohrt <monte@ispi.net>