|
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 |
hexetic Smarty n00b
Joined: 08 Dec 2015 Posts: 3
|
Posted: Tue Dec 08, 2015 8:29 pm Post subject: Smarty fails to strip whitespace inside function calls |
|
|
Sometimes it is nice to split up a long {call} block over several lines. It is also nice to indent those following lines to make it clear that they're part of the same level of indentation, e.g.:
Code: | {call name="someFun"
param1="val1"
param2="val2"
...
}
|
The problem is, Smarty will include those spaces in the generated code, breaking the parameters:
Code: | <?php smarty_template_function_someFun($_smarty_tpl,array(' param1'='val1',' param2'='val2', ...));?> |
Due to the leading spaces before 'param1', 'param2', etc., the function parameters do not inject properly.
Surely, whitespace should be ignored inside {call}s? |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Dec 09, 2015 12:10 pm Post subject: |
|
|
And just what version of the Smarty you are using?… |
|
Back to top |
|
hexetic Smarty n00b
Joined: 08 Dec 2015 Posts: 3
|
Posted: Wed Dec 09, 2015 6:51 pm Post subject: |
|
|
Debian package smarty3 version 3.1.10-2 |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Thu Dec 10, 2015 4:59 am Post subject: |
|
|
Update Smarty your version is outdate very long. |
|
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
|