|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
ilyalyu Smarty Regular
Joined: 03 Nov 2009 Posts: 72
|
Posted: Thu Jul 19, 2012 7:18 am Post subject: smarty_modifier_escape and smarty_modifiercompiler_escape |
|
|
Why do you have two plugins for "escape" modifier? Just curious. |
|
Back to top |
|
rodneyrehm Administrator
Joined: 30 Mar 2007 Posts: 674 Location: Germany, border to Switzerland
|
Posted: Thu Jul 19, 2012 11:13 am Post subject: |
|
|
smarty_modifier_* are functions exected at template evaluation. smarty_modifiercompiler:* are function executed at template compilation.
the latter produces PHP-code that is written to the compiled template file. This allows us to inject simple modifers directly into the source, rather than having them wrapped in a function that's called at runtime.
While both plugins essentially do the same, the modifiercompiler can avoid loading a plugin source file and skips at least one entry to the function stack. _________________ Twitter |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Jul 19, 2012 9:51 pm Post subject: |
|
|
The none compiling version of the escape modifier is a fallback for older PHP versions where the htmlspecialchars() function did not have the $double_encode parameter. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|