--- loncom/interface/spreadsheet/Spreadsheet.pm 2014/04/06 18:59:20 1.85 +++ loncom/interface/spreadsheet/Spreadsheet.pm 2024/11/16 02:41:05 1.86 @@ -1,5 +1,5 @@ # -# $Id: Spreadsheet.pm,v 1.85 2014/04/06 18:59:20 raeburn 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"); @@ -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 '&'