Re: [SMARTY-DEV] strip problem again
| From: | messju mohr | Date: | Mon, 01 Sep 2003 16:01:42 +0000 |
| Subject: | Re: [SMARTY-DEV] strip problem again | ||
| References: | 1 2 3 4 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1836@lists.php.net to get a copy of this message | ||
On Mon, Sep 01, 2003 at 06:51:08PM +0400, Konstantin wrote:
> > {php} echo "?>?>"; {/php}
> >
> > would be a case where the ?>?> is replaced errornously
> I suppose some more specific replacement. Something like in
> "processing cached inserts" part where unique constant is
> used. Or it can be text which will be invalid in any
> context of a compiled template. Something like
> {$//'?><?php!?>
> which is invalid in PHP code, double quotes, single quotes,
> heredoc syntax and HTML-context. But this contains curly
> brace.
>
>
>
> > there are still cases where it above breaks, for example:
> How about something exotic, like
> {strip}
> {php}
> echo '<?php echo "text"; ?>';
> {/php}
> {/strip}
>
> If it was my private project, I'd not even think about them,
> but in common, syntax is valid.
all these cases made me think about a cleaner approach. thanks for
waking me up, konstatin. :)
i committed an additionoal fix for strip. the extra linefeeds after
"?>" are now only emitted out of {strip}...{/strip} context. this
should make monte's patch from the thread
http://lists.php.net/article.php?group=php.smarty.dev&article=1218
obsolete and also should fix the issues that came along with it.
everybody: please test and break it. :)
greetings
messju
> Konstantin A. Pelepelin