--- loncom/interface/lonhelper.pm 2004/10/07 22:12:47 1.88 +++ loncom/interface/lonhelper.pm 2005/01/05 12:07:27 1.91 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # .helper XML handler to implement the LON-CAPA helper # -# $Id: lonhelper.pm,v 1.88 2004/10/07 22:12:47 albertel Exp $ +# $Id: lonhelper.pm,v 1.91 2005/01/05 12:07:27 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1267,7 +1267,7 @@ BUTTONS $result .= "\n \n"; $result .= "&"') + HTML::Entities::encode($choice->[1],"<>&\"'") . "'"; if ($checkedChoices{$choice->[1]}) { $result .= " checked "; @@ -1424,7 +1424,7 @@ sub render { $result .= "&\"'"); + if($option_vars) { + foreach my $option_var (@$option_vars) { + $col .= + " "; + } + } + + $col .= "&"') - . "' />"; - return $col; + $col .= "value='" . $resource_name . "' />"; + return $result.$col; } }; @@ -2217,7 +2279,10 @@ BUTTONS $checked = 1; } $result .= - " value='" . HTML::Entities::encode($choice->[0] . ':' . $choice->[2] . ':' . $choice->[1] . ':' . $choice->[3],'<>&"') + " value='" . HTML::Entities::encode($choice->[0] . ':' + .$choice->[2] . ':' + .$choice->[1] . ':' + .$choice->[3], "<>&\"'") . "' />" . HTML::Entities::encode($choice->[1],'<>&"') . "" @@ -2533,7 +2598,7 @@ BUTTONS my $id = &new_id(); $result .= '" . "&"'). + . ".forminput' ".qq{id="$id"}." value='" . HTML::Entities::encode($fileName,"<>&\"'"). "'"; if (!$self->{'multichoice'} && $choices == 0) { $result .= ' checked'; @@ -3215,7 +3280,7 @@ sub render { $result .= '
  • '.&mt('for section [_1]',"$section").'
  • '; $level -= 3; $result .= "&"') . "' />\n"; + HTML::Entities::encode($section,"'<>&\"") . "' />\n"; } else { # FIXME: This is probably wasteful! Store the name! my $classlist = Apache::loncoursedata::get_classlist(); @@ -3227,9 +3292,9 @@ sub render { $level -= 6; my ($uname, $udom) = split /:/, $vars->{USER_NAME}; $result .= "&"') . "' />\n"; + HTML::Entities::encode($uname,"'<>&\"") . "' />\n"; $result .= "&"') . "' />\n"; + HTML::Entities::encode($udom,"'<>&\"") . "' />\n"; } # Print value