--- loncom/homework/rankresponse.pm 2013/04/30 03:03:34 1.69 +++ loncom/homework/rankresponse.pm 2014/02/27 14:41:34 1.70 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # rank style response # -# $Id: rankresponse.pm,v 1.69 2013/04/30 03:03:34 raeburn Exp $ +# $Id: rankresponse.pm,v 1.70 2014/02/27 14:41:34 bisitz Exp $ # Copyright Michigan State University Board of Trustees # # This file is part of the LearningOnline Network with CAPA (LON-CAPA). @@ -336,7 +336,7 @@ sub format_prior_answer { my $output; foreach my $name (@{ $foil_order }) { next if (!defined($lastresponse{$name})); - $output .= ''.$lastresponse{$name}.''; + $output .= ''.&HTML::Entities::encode($lastresponse{$name},'<>&"').''; } return if (!defined($output)); $output =