Re: [SMARTY] Striping backslashes in _POST, _GET
| From: | Travis Low | Date: | Wed, 15 Oct 2003 13:42:52 +0000 |
| Subject: | Re: [SMARTY] Striping backslashes in _POST, _GET | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-10352@lists.php.net to get a copy of this message | ||
Maybe:
{$smarty.get.variable|replace:"\\":""}
(I didn't try it, though.)
cheers,
Travis
Jiří Němec wrote:
Hello, I wrote a function which strips backslashes pro given array. It works well, if I use this function eg. on $_GET and then write out this array - var_dump($_GET) all backslashes are stripped. But if I write variables in template, there are backslashes again. function stripsl(&$item){ $item = stripslashes($item); } array_walk($_GET, 'stripsl'); var_dump($_GET); //array is stripped - ok template: {smarty.get.variable} // there are backslashes again I tried use this function before and after inicialization smarty class and it doesn't work...have got somebody some idea? (I don't want to turn off magic_quotes). Jiří Němec, ICQ: 114651500 www.menea.cz - www stránky a aplikace-- Travis Low <mailto:travis@dawnstar.com> <http://www.dawnstar.com>