- my $json = JSON::MaybeXS->new(canonical => 1)->encode({files => \@files, prefix => $prefix});
- $json =~ s/</</g;
- $json =~ s/>/>/g;
- $ht->param(files=>[sort { $a->{title} cmp $b->{title} } @files], prefix => $prefix, json => $json);
+ @files = sort { $a->{title} cmp $b->{title} } @files;
+ $ht->param(files => \@files, prefix => $prefix);