encode html

master
Joey Hess 2011-06-09 10:46:09 -04:00
parent cf707d1654
commit f3ed43a1ca
1 changed files with 4 additions and 1 deletions

View File

@ -58,10 +58,13 @@ sub showuserlist ($$) {
my $h="<table border=\"1\">\n"; my $h="<table border=\"1\">\n";
$h.="<tr><th>".gettext("login")."</th><th>".gettext("email")."</th></tr>\n"; $h.="<tr><th>".gettext("login")."</th><th>".gettext("email")."</th></tr>\n";
my $info=IkiWiki::userinfo_retrieve(); my $info=IkiWiki::userinfo_retrieve();
eval q{use HTML::Entities};
if (ref $info) { if (ref $info) {
foreach my $user (sort { $info->{$a}->{regdate} <=> $info->{$b}->{regdate} } keys %$info) { foreach my $user (sort { $info->{$a}->{regdate} <=> $info->{$b}->{regdate} } keys %$info) {
my %i=%{$info->{$user}}; my %i=%{$info->{$user}};
$h.="<tr><td>$user</td><td>".(defined $i{email} ? $i{email} : "")."</tr>\n"; $h.="<tr><td>".encode_entities($user)."</td><td>".
encode_entities(defined $i{email} ? $i{email} : "").
"</td></tr>\n";
} }
} }
$h.="</table>\n"; $h.="</table>\n";