Re: [SMARTY-DEV] strip problem again

From: Date: Thu, 28 Aug 2003 16:58:26 +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-1821@lists.php.net to get a copy of this message
> 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. Well, you're right with 2.5.0: http://lists.php.net/article.php?group=php.smarty.dev&article=1218 was introduced after 2.5.0 I just installed 2.5.0 and there is no this problem. > what am i doing wrong? May be, you're on a Windows machine? This could be the reason for first regexp not to match. But it seems to be the fantasy of me. I don't know... Regexps say, problem should exist :) $_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 Thinking of it, I'd suppose we can safely remove fourth replace and leave first. As Monte mentioned, normally we need to insert newline after closing PHP tag (or else PHP will eat extra newline which in many cases is not good). But since designer uses {strip}, there is no need in them. WBR, Konstantin A. Pelepelin

« previous php.smarty.dev (#1821) next »