Re: [SMARTY] How do you deal with special chars in template vars?
| From: | Carsten Saathoff | Date: | Wed, 17 Jul 2002 06:10:06 +0000 |
| Subject: | Re: [SMARTY] How do you deal with special chars in template vars? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5348@lists.php.net to get a copy of this message | ||
On Tue Jul 16 22:50:49 2002 CEST Bogien wrote:
> How do you deal with special characters in template variables?
>
I always save the 'normal' data in the DB and store the converted data
in Smarty Vars. I think the template designer should be able to just
print out the vars without the need to use any modifiers. Additionaly,
like was said before, storing HTML Entities in the DB isn't a good idea
neither, because those Entites just do not belong into a DB. You'll get
problems if you want to export the Data for other purposes or if
you want to access the Data with another tool that's not HTML based.
Default modifers sound like a good idea. I always thought, that Smarty
should convert special characters to their respective Entities on the
fly (maybe controlled via a switch). Converting all Data manually is
annoying, especially if you have big output arrays that you need to loop
through in order to convert all data. Default modifiers would be of
great help then.
greets
Carsten
--
Carsten Saathoff ...powered by Linux ICQ #52558095
The gods are great, I am the greatest!
(Borknagar)