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

From: Date: Mon, 17 Mar 2003 08:54:50 +0000
Subject: Re: [SMARTY-DEV] possible assign + escaped quotes bug
References: 1 2  Groups: php.smarty.dev 
Request: Send a blank email to php-smarty-dev+get-969@lists.php.net to get a copy of this message
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 (#969) next »