Re: [SMARTY-DEV] strip problem again
| From: | messju mohr | Date: | Thu, 28 Aug 2003 16:18:30 +0000 |
| Subject: | Re: [SMARTY-DEV] strip problem again | ||
| References: | 1 2 3 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-1820@lists.php.net to get a copy of this message | ||
On Thu, Aug 28, 2003 at 07:49:32PM +0400, Konstantin wrote:
> > > tabs _AFTER_ the include are not stripped.
> > Smarty_Compiler.class.php 1.278 has this
> > fixed already.
> Sorry, it isn't.
sorry, but if i run the example you gave, i get
<table><tr><td>test texttest textTESTTESTtest
text</td></tr></table>
i also get that with Smarty-2.4.2, Smarty-2.5.0,
Smarty_Compiler.class.php r1.277 and r1.278.
what am i doing wrong?
> But the place is right.
>
> $_strip_search = array(
> '%([^\\\\]\?>)\n%', // remove newlines after PHP close tags
> "!{$ldq}/?strip{$rdq}|\s+$|^\s+!m", // remove leading/trailing space chars
> '%[\r\n]+%m', // remove CRs and newlines
> '%([^\\\\]\?>)%'); // replace newlines after PHP close tags
> $_strip_replace = array(
> '\\1',
> '',
> '',
> '\\1' . "\n");
>
> First regexp removes newline and fourth places them back.
> If I remember well there already was a trouble with them.
>
> Yes, I find.
>
> http://lists.php.net/article.php?group=php.smarty.dev&article=1216
>
> http://lists.php.net/article.php?group=php.smarty.dev&article=1217
>
> http://lists.php.net/article.php?group=php.smarty.dev&article=1218
>
> Look there again please.
>
> WBR,
> Konstantin A. Pelepelin