Smarty 2.0.1 - a bug (security + debugging) and a recommendation

From: Date: Wed, 03 Apr 2002 11:57:26 +0000
Subject: Smarty 2.0.1 - a bug (security + debugging) and a recommendation
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-3452@lists.php.net to get a copy of this message
Hello! 1. I think I've found a bug: In the latest version of Smarty (2.0.1), when I mix debugging with security, I get the following errors: > Warning: Undefined offset: 3 in c:\program files\apache > > group\apache\htdocs\Smarty_Compiler.class.php on line 859 This is the effect of adding a line "$smarty->security = true;" to the file "index.php" which comes bundled with Smarty-2.0.1.tar.gz. Errors appear only in the main browser window - the debugging console pops up and displays correctly. How to fix this issue? 2. A recommendation - I think that it can be useful to add something like "default/global modifiers" - functions that will be applied to all the Smarty variables in the template. It is pretty tiring to write: > blah blah blah {$text1|htmlspecialchars} > {$text2|htmlspecialchars} {$text3|htmlspecialchars} > abc def {$text4|htmlspecialchars} 123 It would be nice to store the data in the database "as they are" and then escape < > chars with some global/default modifier function. Thanks, Yours faithfully, Michal Prinke

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