Re: [SMARTY] get_magic_quotes_gpc problem : slashes - URGENT !

From: Date: Mon, 07 Jul 2003 11:29:35 +0000
Subject: Re: [SMARTY] get_magic_quotes_gpc problem : slashes - URGENT !
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-9842@lists.php.net to get a copy of this message
> Althogh this must - and does- remove slashes from the post/get > values, somehow still they are escaped in smarty templates. I guess > somewhere > in the smarty class library, they are escaped again . And I am about > to publish this project in a live site tonight. Can somenone advice > me how to make > a quick fix ? Should I make a pre/post filter for this ? How do other > people fix this problem in their programs ? Any advice on this issue > will be greatly appriciated ... this is because Smarty doesn't use the autoglobals ($_GET, $_REQUEST etc) but $HTTP_GET_VARS etc... the current CVS version brings a switch which lets you choose between the two different options (autoglobals on or off), this will make your life a lot easier until the CVS version is stable, just do while( list($k, $v) = each($GLOBALS["HTTP_POST_VARS"][$k]) ) { $GLOBALS["HTTP_POST_VARS"][$k] = stripslashes($v); } Regards, David

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