Striping backslashes in _POST, _GET
| From: | Jiří Němec | Date: | Wed, 15 Oct 2003 13:37:55 +0000 |
| Subject: | Striping backslashes in _POST, _GET | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-10351@lists.php.net to get a copy of this message | ||
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