Re: [SMARTY-DEV] Smarty 2.6.0 RC1 - Bug in strip (?)
| From: | messju mohr | Date: | Wed, 20 Aug 2003 15:38:25 +0000 |
| Subject: | Re: [SMARTY-DEV] Smarty 2.6.0 RC1 - Bug in strip (?) | ||
| References: | 1 2 3 4 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1784@lists.php.net to get a copy of this message | ||
On Wed, Aug 20, 2003 at 07:25:26PM +0400, Konstantin A. Pelepelin wrote:
> >the {strip} function was reverted back into the compiler.
> Well, it seems less logical, but more convenient and faster.
but the docs for strip say:
"Many times web designers run into the issue where white space and
carriage returns affect the output of the rendered HTML (browser
"features"), so you must run all your tags together >>>in the
template<<< to get the desired results.
...
This way you can keep your templates readable, and not worry about
extra white space causing problems."
so if the intention of {strip} is to strip the whitespace only from
the templates, it's more logical at a pre- or post-filter stage (is it
is now) than at display (as it was).
if one wants to strip the whole templates's output (optimizing
html-code size or the like) we still have
outputfilter.trimwhitespace.php in the distribution.