Re: [SMARTY-DEV] possible assign + escaped quotes bug
| From: | Monte Ohrt | Date: | Fri, 14 Mar 2003 16:29:14 +0000 |
| Subject: | Re: [SMARTY-DEV] possible assign + escaped quotes bug | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-953@lists.php.net to get a copy of this message | ||
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
>
>
>
--
Monte Ohrt <monte@ispi.net>