From: Moritz Bunkus Date: Wed, 31 Jul 2013 14:22:26 +0000 (+0200) Subject: ClientJS: Leading Whitespace von allen Argumenten tilgen, nicht nur vom ersten X-Git-Tag: release-3.1.0beta1~116 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/926ebeb795a6bd8939ae3bfed24b665a5bf1552b?ds=inline;hp=-c ClientJS: Leading Whitespace von allen Argumenten tilgen, nicht nur vom ersten --- 926ebeb795a6bd8939ae3bfed24b665a5bf1552b diff --git a/SL/ClientJS.pm b/SL/ClientJS.pm index 0e18d732b..93bbd7482 100644 --- a/SL/ClientJS.pm +++ b/SL/ClientJS.pm @@ -132,10 +132,10 @@ sub action { croak "Unsupported jQuery action: $method" unless defined $num_args; croak "Parameter count mismatch for $method(actual: " . scalar(@args) . " wanted: $num_args)" if scalar(@args) != $num_args; - if ($num_args) { + foreach my $idx (1..$num_args) { # Force flattening from SL::Presenter::EscapedText: "" . $... - $args[0] = "" . $args[0]; - $args[0] =~ s/^\s+//; + $args[$idx - 1] = "" . $args[$idx - 1]; + $args[$idx - 1] =~ s/^\s+//; } push @{ $self->_actions }, [ $method, @args ];