Remove all Encode::decode_utf8 calls, as seemingly scalars from PostgreSQL comes...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 26 Apr 2015 05:34:24 +0000 (07:34 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Sun, 26 Apr 2015 05:34:24 +0000 (07:34 +0200)
perl/Sesse/pr0n/Common.pm
perl/Sesse/pr0n/Index.pm
perl/Sesse/pr0n/Listing.pm

index 63190b14295aadc1d10df6d19d0480cd5e672eec..1cd65046d9769787de6aa3ca44205fb19137fb79 100644 (file)
@@ -96,7 +96,7 @@ sub header {
                $quote = LWP::Simple::get("http://itk.samfundet.no/include/quotes.cli.php");
                $quote = "Error: Could not fetch quotes." if (!defined($quote));
        }
-       Sesse::pr0n::Templates::print_template($r, "header", { title => $title, quotes => Encode::decode_utf8($quote) });
+       Sesse::pr0n::Templates::print_template($r, "header", { title => $title, quotes => $quote });
 }
 
 sub footer {
index 22d233b1d26276cfe0e3ae94eb408a13af79b21b..1a631ebaea16f5e6746f2d77a1c22402ad1b665a 100644 (file)
@@ -164,8 +164,8 @@ sub handler {
                        undef, $r->get_server_name, $event)
                        or error($r, "Could not find event $event", 404, "File not found");
 
-               $date = HTML::Entities::encode_entities(Encode::decode_utf8($ref->{'date'}));
-               $name = HTML::Entities::encode_entities(Encode::decode_utf8($ref->{'name'}));
+               $date = HTML::Entities::encode_entities($ref->{'date'});
+               $name = HTML::Entities::encode_entities($ref->{'name'});
                $r->set_last_modified($ref->{'last_update'});
        }
                                
index 2cb1125277e3be0e92d8df47b29792902b7d2a6c..c8f93f249fae58c2ef8ba34ea9c093bf7e58eb5e 100644 (file)
@@ -48,7 +48,7 @@ sub handler {
                my $cloud = HTML::TagCloud->new;
 
                while (my $ref = $q->fetchrow_hashref()) {
-                       my $tag = Encode::decode_utf8($ref->{'tag'});
+                       my $tag = $ref->{'tag'};
                        my $html = HTML::Entities::encode_entities($tag);    # is this right?
                        my $uri = Sesse::pr0n::Common::pretty_escape($tag);  # and this?
 
@@ -86,8 +86,8 @@ sub handler {
 
                while (my $ref = $q->fetchrow_hashref()) {
                        my $id = $ref->{'event'};
-                       my $date = HTML::Entities::encode_entities(Encode::decode_utf8($ref->{'date'}));
-                       my $name = HTML::Entities::encode_entities(Encode::decode_utf8($ref->{'name'}));
+                       my $date = HTML::Entities::encode_entities($ref->{'date'});
+                       my $name = HTML::Entities::encode_entities($ref->{'name'});
                        
                        $r->print("      <li><a href=\"$id/\">$name</a> ($date)</li>\n");
                }