--- loncom/interface/lonhelper.pm 2004/09/24 19:49:12 1.87 +++ loncom/interface/lonhelper.pm 2005/01/03 13:45:31 1.90 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # .helper XML handler to implement the LON-CAPA helper # -# $Id: lonhelper.pm,v 1.87 2004/09/24 19:49:12 matthew Exp $ +# $Id: lonhelper.pm,v 1.90 2005/01/03 13:45:31 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 $var (@$option_vars) { + $col .= + " "; + } + } + + $col .= "&"') - . "' />"; - return $col; + $col .= "value='" . $resource_name . "' />"; + return $result.$col; } }; @@ -2217,7 +2266,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 +2585,7 @@ BUTTONS my $id = &new_id(); $result .= '" . "&"'). + . ".forminput' ".qq{id="$id"}." value='" . HTML::Entities::encode($fileName,"<>&\"'"). "'"; if (!$self->{'multichoice'} && $choices == 0) { $result .= ' checked'; @@ -3147,7 +3199,6 @@ sub render { my $res = $navmap->getByMapPc($vars->{RESOURCE_ID}); my $title = $res->compTitle(); $symb = $res->symb(); - $navmap->untieHashes(); $resourceString .= '
  • '.&mt('for the map named [_1]',"$title").'
  • '; $level = 8; $affectedResourceId = $vars->{RESOURCE_ID}; @@ -3157,7 +3208,6 @@ sub render { my $res = $navmap->getById($vars->{RESOURCE_ID}); $symb = $res->symb(); my $title = $res->compTitle(); - $navmap->untieHashes(); $resourceString .= '
  • '.&mt('for the resource named [_1]',"$title").'
  • '; $level = 7; $affectedResourceId = $vars->{RESOURCE_ID}; @@ -3217,7 +3267,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(); @@ -3229,9 +3279,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