[ic] Possible jsq / jsqn bug
Mike Heins
mike at perusion.com
Mon Nov 8 13:26:35 EST 2004
Quoting John Rennie (john-rennie at thechampagneshop.co.uk):
> Hi,
>
> I think there's a bug in the jsq and jsqn tags. If they
> are given nothing, they return nothing instead of
> returning ''. (This causes javascript errors on the
> multi-page checkout in Mike's demo in some circumstances.)
>
> The following change seems to fix it, although there's
> probably a much neater way. (jsq shown, jsqn is similar.)
> --- my @lines = split /\r?\n/, $text;
> +++ my @lines = ('');
> +++ @lines = split /\r?\n/, $text if $text;
>
> Could one of the team please check/amend this?
i think this is a valid complaint about the tag. i have updated cvs
with the following patch:
--- jsq.coretag 2002-11-04 08:54:05.000000000 -0500
+++ /uit/jsq.coretag 2004-11-08 13:24:34.527443872 -0500
@@ -15,6 +15,7 @@
or
( s/'/\\'/g, s/\r/\\r/g, s/(^|[^\\])\$\{?(\w+)\}?/$1' + $2 + '/g, $_ = qq{'$_'} );
}
+ @lines = "''" unless @lines;
return join (" +\n", @lines);
}
EOR
--
Mike Heins
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 tollfree 800-949-1889 <mike at perusion.com>
p.s. sorry for lower case, injured hand
Being against torture ought to be sort of a bipartisan thing.
-- Karl Lehenbauer
More information about the interchange-users
mailing list