RE: [SMARTY-DEV] trimwhitespace outputfilter bug
| From: | Steve | Date: | Mon, 10 Mar 2003 05:38:30 +0000 |
| Subject: | RE: [SMARTY-DEV] trimwhitespace outputfilter bug | ||
| References: | 1 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-931@lists.php.net to get a copy of this message | ||
try this as an example:
problem.php:
<?php
define('SMARTY_DIR', '/var/www/html/bw/inc/lib/smarty/');
require_once("Smarty.class.php");
$tmpl = new Smarty;
$tmpl->assign(array('var' =>
"$59.95<br>$79.97<br>$99.99<br>$10000.00<br>1000.00"));
$tmpl->load_filter('output', 'trimwhitespace');
$tmpl->display("problem.tpl");
?>
problem.tpl:
<table border="0" width="100%" cellspacing="0"
cellpadding="2">
<tr valign="top">
<td><textarea name="description" wrap="soft" cols="80"
rows="20" class="
textbox">{$var}</textarea></td>
</tr>
</table>
I am using latest Smarty with outputfilter.trimwhitespace.php v 1.3
-----Original Message-----
From: messju mohr [mailto:messju@lammfellpuschen.de]
Sent: Saturday, March 08, 2003 11:18 PM
To: Steve
Cc: smarty-dev@lists.php.net
Subject: Re: [SMARTY-DEV] trimwhitespace outputfilter bug
On Sat, Mar 08, 2003 at 08:18:41PM -0800, Steve wrote:
> this is a good one:)
>
> pseudo code/explanation:
> .php file:
> $var = "$59.95 blah blah"
you mean $tmpl->assign('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 :)
it works fine for me with 2.4.2 and 2.5.0-RC1.
> Thanks so much,
>
> Steve
--
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php