Re: [SMARTY-DEV] newline after ?> in compiled templates
| From: | Wom.bat | Date: | Fri, 25 Apr 2003 12:38:28 +0000 |
| Subject: | Re: [SMARTY-DEV] newline after ?> in compiled templates | ||
| References: | 1 2 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1269@lists.php.net to get a copy of this message | ||
gnah... you're right ;)
David
----- Original Message -----
From: "messju mohr" <messju@lammfellpuschen.de>
To: "Wom.bat" <wom.bat@gmx.net>
Cc: <smarty-dev@lists.php.net>
Sent: Friday, April 25, 2003 2:36 PM
Subject: Re: [SMARTY-DEV] newline after ?> in compiled templates
> On Fri, Apr 25, 2003 at 01:33:37PM +0200, Wom.bat wrote:
> > if I do a
> >
> > {$smarty.constant.FOO}bar
> >
> > the resulting output will be
> >
> > <?php echo @constant('FOO'); ?>
> > bar
>
> yes, but since php slurps newlines after ?>, the resulting output's
> output, you won't become
>
> FOO
> bar
>
> but
>
> FOObar
>
>
> > i.e. a newline is added after "?>"... this may lead to problems when
using
> > anything else than html (for example, plain text email templates), or if
I
> > want to replace this construct via an outputfilter (I do so for
dynamically
> > inserting a <meta http-equiv="refresh"...>)... I'd have to set the
> > preg
(in
> > this case, I don't need one) to /s to include newlines
> >
> > As far as I can see that, Smarty always places a newline after a "?>"...
> > maybe this should be fixed!? ;)
> >
> > (Smarty version is the current CVS)
> >
> > Regards,
> > David
> >
> >
> >
> > --
> > Smarty Development Mailing List (http://smarty.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>