--- loncom/interface/spreadsheet/Spreadsheet.pm 2014/02/28 19:20:11 1.84 +++ loncom/interface/spreadsheet/Spreadsheet.pm 2024/11/16 02:41:05 1.86 @@ -1,5 +1,5 @@ # -# $Id: Spreadsheet.pm,v 1.84 2014/02/28 19:20:11 bisitz Exp $ +# $Id: Spreadsheet.pm,v 1.86 2024/11/16 02:41:05 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -327,6 +327,7 @@ sub initialize_safe_space { $safeeval = new Safe(shift); my $safehole = new Safe::Hole; $safeeval->permit("entereval"); + $safeeval->permit("hintseval"); $safeeval->permit(":base_math"); $safeeval->permit("sort"); $safeeval->deny(":base_io"); @@ -883,7 +884,7 @@ sub expandnamed { } else { # There was a negative number of matches, which indicates # something is wrong with reality. Better warn the user. - $returnvalue = "'".&mt('bizzarre parameter: [_1]',$expression)."'"; + $returnvalue = "'".&mt('bizarre parameter: [_1]',$expression)."'"; } return $returnvalue; } @@ -1351,7 +1352,7 @@ sub html_editable_cell { # # The encoding string "^A-blah" is placed in []'s inside a regexp, so # we specify the characters we want left alone by putting a '^' in front. - $formula = &HTML::Entities::encode($formula,'^A-z0-9 !#$%-;=?~'); + $formula = &HTML::Entities::encode($formula,'^A-z0-9 !#$%;=?~-'); # HTML::Entities::encode does not catch everything - we need '\' encoded $formula =~ s/\\/&\#092/g; # Escape it again - this time the only encodable character is '&'