Re: [SMARTY-DEV] possible assign + escaped quotes bug

From: Date: Tue, 18 Mar 2003 11:05:52 +0000
Subject: Re: [SMARTY-DEV] possible assign + escaped quotes bug
References: 1 2 3 4  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-984@lists.php.net to get a copy of this message
Btw, When upgrading my code for 2.5.x I noticed that: {assign var="testing" value="You will read this twice."} {assign var="moretesting" value=$testing."<br>".$testing} {$moretesting} results in a parse error (also without the "<br>"). This might be designed behavior though since I understand that the dot has a more ambiguous function in the newer releases of Smarty. The line: {assign var="moretesting" value="$testing<br>$testing"} works correctly though. I take it that I should change this. Regards Niels Monte Ohrt wrote: > Fixed, thanks for finding this. > > Monte > > On Mon, 2003-03-17 at 02:54, N.W.M. Schoot wrote: >> Thanks, I just got the latest version from CVS. This version seems to >> work better, but I found at least one more problem. >> >> I tried: >> >> {assign var="testing" value="this is \"escaped\" content"} >> {assign var="moretesting" value="this is \"$testing\" >> content"} >> {$moretesting} >> >> This works in 2.3.1, but the latest unstable teturns a parse error. >> >> The line: >> >> {assign var="moretesting" value="this is \" $testing\" >> content"} >> >> however (note the space before $testing) does work correctly. I also >> tried removing the escaped quotes from $testing, but that didn't make any >> difference. >> >> Keep up the good work, >> Regards, >> >> Niels >> >> >> >> >> >> >> >> >> Monte Ohrt wrote: >> >> > That's a bug, and I just committed a patch to CVS. Please give it a >> > test. >> > >> > Monte >> > >> > On Fri, 2003-03-14 at 09:31, N.W.M. Schoot wrote: >> >> Hi, >> >> >> >> I just upgraded my version of Smarty from 2.3.1 to 2.4.2 and >> >> discovered problems with the {assign ...} template function. The >> >> problem is still there in 2.5.0rc1 so I'm reporting it here >> >> >> >> I'm using the following in a template: >> >> >> >> --- >> >> >> >> testing assignments<br> >> >> {assign var="testing" value="this is \"escaped\" >> >> content"} >> >> {$testing}<br> >> >> >> >> --- >> >> >> >> In 2.3.1 this would display as: >> >> >> >> this is "escaped" content >> >> >> >> in 2.4.2 and in 2.5.0rc1 it displays as: >> >> >> >> this is \"escaped\" content >> >> >> >> This causes rendering problems when feeding this string to other >> >> smarty plugins. >> >> >> >> I naturally also tried the following assignment: >> >> >> >> {assign var="testing" value="this is "escaped" >> >> content"} >> >> >> >> In 2.3.1 this wouldn't display (which is correct behavior IMO) >> >> >> >> In 2.4.2 and 2.5.0rc1 it displays as: >> >> >> >> "this is "escaped" content" >> >> >> >> (note the unexpected "'s around the string). >> >> >> >> When assigning escaped values in the PHP code with $smarty->assign(), >> >> everything works like it should. The assign plugin hasn't changed >> >> since 2.3.1, so it should be another problem. Is this a bug? >> >> >> >> Regards, >> >> Niels >> >> >> >> niels at acklin dot nl >> >> >> >> >> >>

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