From: Steinar H. Gunderson Date: Sun, 10 Jun 2012 01:22:22 +0000 (+0200) Subject: Fix double-HTML-encoding. X-Git-Url: https://git.sesse.net/?p=wloh;a=commitdiff_plain;h=f2e37943d0b0af48ad041dbe417800074516d46c Fix double-HTML-encoding. --- diff --git a/www/index.pl b/www/index.pl index a01f514..2b7dcaf 100755 --- a/www/index.pl +++ b/www/index.pl @@ -31,10 +31,6 @@ my %ratings = (); my %ratings_stddev = (); my @matches = (); -sub sanitize { - return HTML::Entities::encode_entities(shift); -} - sub color { my $x = shift; return int(255.0 * ($x ** (1.80))); @@ -93,7 +89,7 @@ sub get_players_and_ratings { while (my $ref = $q->fetchrow_hashref) { my $id = $ref->{'id'}; - $players{$id} = sanitize(Encode::decode_utf8($ref->{'navn'})); + $players{$id} = Encode::decode_utf8($ref->{'navn'}); $ratings{$id} = $ref->{'rating'}; $ratings_stddev{$id} = $ref->{'rating_stddev'}; }