diff --git a/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm b/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm index bf505320db..413391a151 100644 --- a/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm +++ b/lib/WeBWorK/ContentGenerator/GatewayQuiz.pm @@ -1020,7 +1020,7 @@ sub pre_header_initialize { foreach my $key (keys %$formFields) { if ($key =~ /AnSwEr/) { $formFields->{$key} = $scrubber->scrub( - (defined $formFields->{$key})? $formFields->{key}:'' # using // would be more elegant but breaks perl 5.8.x + (defined $formFields->{$key})? $formFields->{$key}:'' # using // would be more elegant but breaks perl 5.8.x ); ### HTML::scrubber is a little too enthusiastic about ### removing > and < so we have to add them back in otherwise diff --git a/lib/WeBWorK/ContentGenerator/Problem.pm b/lib/WeBWorK/ContentGenerator/Problem.pm index c5dfa4c2ea..310cae9aa7 100644 --- a/lib/WeBWorK/ContentGenerator/Problem.pm +++ b/lib/WeBWorK/ContentGenerator/Problem.pm @@ -733,7 +733,7 @@ sub pre_header_initialize { foreach my $key (keys %$formFields) { if ($key =~ /AnSwEr/) { $formFields->{$key} = $scrubber->scrub( - (defined $formFields->{$key})? $formFields->{key}:'' # using // would be more elegant but breaks perl 5.8.x + (defined $formFields->{$key})? $formFields->{$key}:'' # using // would be more elegant but breaks perl 5.8.x ); ### HTML::scrubber is a little too enthusiastic about ### removing > and < so we have to add them back in otherwise