RE: [SMARTY-DEV] trimwhitespace outputfilter bug
| From: | Monte Ohrt | Date: | Mon, 10 Mar 2003 22:31:12 +0000 |
| Subject: | RE: [SMARTY-DEV] trimwhitespace outputfilter bug | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-937@lists.php.net to get a copy of this message | ||
You can't escape special chars in your db handling functions?
On Mon, 2003-03-10 at 16:25, Steve wrote:
> The problem here is that the assignment is the result of a database query.
> The code I sent was just an example to illustrate the problem. How do I
> handle this when a database query is the source of the data for the
> assignment?
>
> Can this be fixed in the outputfilter?
>
> -----Original Message-----
> From: Monte Ohrt [mailto:monte@ispi.net]
> Sent: Monday, March 10, 2003 8:47 AM
> To: Steve
> Cc: Smarty Dev
> Subject: Re: [SMARTY-DEV] trimwhitespace outputfilter bug
>
>
> $ signs are interperted in double quotes when you assign it. Try one of
> these:
>
> $var = '$59.95 blah blah';
> $var = "\$59.95 blah blah";
>
>
> On Sat, 2003-03-08 at 22:18, Steve wrote:
> > this is a good one:)
> >
> > pseudo code/explanation:
> > .php file:
> > $var = "$59.95 blah blah"
> > $tmpl->load_filter('output', 'trimwhitespace');
> >
> > in template:
> > {$var}<br>
> > <textarea>{$var}</textarea>
> >
> > output:
> > $59.95 blah blah<br>
> > <textarea>.95 blah blah</textarea>
> >
> > I looked at the regex, I'm lost. It's ripping away the $59. Can someone
> > fix this? The filter is great, but not when it breaks the content :)
> >
> > Thanks so much,
> >
> > Steve
> --
> Monte Ohrt <monte@ispi.net>
>
>
> --
> Smarty Development Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--
Monte Ohrt <monte@ispi.net>