Re: [SMARTY] Smarty 'unescape' variable modifier ?

From: Date: Wed, 24 Mar 2004 16:25:45 +0000
Subject: Re: [SMARTY] Smarty 'unescape' variable modifier ?
References: 1 2 3  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11169@lists.php.net to get a copy of this message
You can create a custom modifier to unescape to your liking, or use the regex_replace modifier. You're real problem lies in the fact that PHP is escaping your variables. SQL escapement should ideally be done just before the SQL statement. Magic quotes are evil, get rid of 'em IMHO. On Wed, 2004-03-24 at 10:04, Artur Pydo wrote: > Hi, > > Robby Russell wrote: > > > You should unescape them when you remove them from the database in your > > SQL statement rather than make your application do it. More logic in db > > than in client interface will make your coding easier in the long run. > > It does not come from database. It comes from a post variable and is > escaped by PHP. But i want to display it _before_ it's inserted into > the database. So in this case it's useless to unescape all post data > before escaping it once again. > > -- > > Best regards, > > Artur Pydo.

« previous php.smarty.general (#11169) next »