Date: 2021-11-08 04:47
Posted By: Ruud van der Velden (ruudvdvelden)
Yuri 10:32
@velden Thank you, it is useful Smarty filter to shorten the output of html
code. This feature is not engaged now, but it is included. Why not to use it.
velden 10:42
What about the {strip}{/strip} tags in the places you want to use it?
Yuri 10:47
My version is simpler. And you can quickly switch of it for debug.
Date: 2021-11-09 19:13
Posted By: tom (tomphantoo)
Smarty already supports this:
/**
* Smarty trimwhitespace outputfilter plugin
* Trim unnecessary whitespace from HTML markup.
*
* @author Rodney Rehm
*
* @param string $source input string
*
* @return string filtered output
* @todo substr_replace() is not overloaded by mbstring.func_overload - so
this function might fail!
*/
function smarty_outputfilter_trimwhitespace($source) ...
see https://www.smarty.net/docs/en/plugins.outputfilters.tpl
Otherwise, add trim() to the allowed PHP functions in the security policy class