--- loncom/homework/structuretags.pm 2015/04/10 08:22:21 1.533 +++ loncom/homework/structuretags.pm 2015/04/10 12:01:28 1.534 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # definition of tags that give a structure to a document # -# $Id: structuretags.pm,v 1.533 2015/04/10 08:22:21 droeschl Exp $ +# $Id: structuretags.pm,v 1.534 2015/04/10 12:01:28 droeschl Exp $ # # Copyright Michigan State University Board of Trustees # @@ -811,14 +811,14 @@ sub template_dropdown_datastructure { foreach my $title (sort @{$tmplthash{$cat}}) { my $path = $tmpltcontent{$title}->[0]; my $code; - open(FH, "<:encoding(UTF-8)", $path); + open(FH, "<$path"); while(){ $code.= $_ unless $_ =~ /()|(<\/problem>)/; } close(FH); if ($code ne '') { - my $href = 'javascript:insertText(\'' . &convert_for_js(&HTML::Entities::encode($code)) . '\')'; + my $href = 'javascript:insertText(\'' . &convert_for_js(&HTML::Entities::encode($code,'<>&"')) . '\')'; my $currItem = [$href, $title, undef]; push @{$catItems}, $currItem; }