From 926ebeb795a6bd8939ae3bfed24b665a5bf1552b Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 31 Jul 2013 16:22:26 +0200 Subject: [PATCH] ClientJS: Leading Whitespace von allen Argumenten tilgen, nicht nur vom ersten --- SL/ClientJS.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ]; -- 2.20.1