]> git.sesse.net Git - wloh/commitdiff
Fix double-HTML-encoding.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 10 Jun 2012 01:22:22 +0000 (03:22 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 10 Jun 2012 01:22:22 +0000 (03:22 +0200)
www/index.pl

index a01f514c25e50dd95cc6a481b317245bb653d619..2b7dcaf31c03080d745526cd1cbc843cfb5a8f4b 100755 (executable)
@@ -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'};
        }