[Petal] Re: Petal bug in quoting of \
Jean-Michel Hiver
jhiver at mkdoc.com
Thu Jun 26 12:05:20 BST 2003
On Mon 23-Jun-2003 at 07:20:35PM +0100, Fergal Daly wrote:
> Hi Jean-Michel,
> I found a bug in the quoting. This template
>
> <t petal:omit-tag="string:1">\</t>
>
> produces this code
>
> $VAR1 = sub {
> my $hash = shift;
> my $res = "";
> local $^W = 0;
> $res .= "";
> if ($hash->get ('false:string:1')) {
> $res .= "<t>";
> }
> $res .= "\"; # OOPS
> if ($hash->get ('false:string:1')) {
> $res .= "</t>";
> }
> return $res;
> };
Ok, this is a bug, but you should be really writing:
<t petal:omit-tag="string:1">\\</t>
Since \ escapes everything, so if your want your template to output $foo
(rather than the variable 'foo') you can type \$foo.
Cheers,
--
Building a better web - http://www.mkdoc.com/
---------------------------------------------
Jean-Michel Hiver
jhiver at mkdoc.com - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/
More information about the Petal
mailing list