version 1.533, 2015/04/10 08:22:21
|
version 1.534, 2015/04/10 12:01:28
|
Line 811 sub template_dropdown_datastructure {
|
Line 811 sub template_dropdown_datastructure {
|
foreach my $title (sort @{$tmplthash{$cat}}) { |
foreach my $title (sort @{$tmplthash{$cat}}) { |
my $path = $tmpltcontent{$title}->[0]; |
my $path = $tmpltcontent{$title}->[0]; |
my $code; |
my $code; |
open(FH, "<:encoding(UTF-8)", $path); |
open(FH, "<$path"); |
while(<FH>){ |
while(<FH>){ |
$code.= $_ unless $_ =~ /(<problem>)|(<\/problem>)/; |
$code.= $_ unless $_ =~ /(<problem>)|(<\/problem>)/; |
} |
} |
close(FH); |
close(FH); |
|
|
if ($code ne '') { |
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]; |
my $currItem = [$href, $title, undef]; |
push @{$catItems}, $currItem; |
push @{$catItems}, $currItem; |
} |
} |