--- loncom/interface/spreadsheet/Spreadsheet.pm 2003/08/01 13:47:26 1.20 +++ loncom/interface/spreadsheet/Spreadsheet.pm 2003/08/26 19:14:06 1.21 @@ -1,5 +1,5 @@ # -# $Id: Spreadsheet.pm,v 1.20 2003/08/01 13:47:26 matthew Exp $ +# $Id: Spreadsheet.pm,v 1.21 2003/08/26 19:14:06 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1217,7 +1217,9 @@ 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 '&' $formula =~ s/\&/\&/g; # Glue everything together