Micro-modularization.
authorSteinar H. Gunderson <sesse@debian.org>
Wed, 25 Jul 2007 23:17:03 +0000 (01:17 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Wed, 25 Jul 2007 23:17:03 +0000 (01:17 +0200)
perl/Sesse/pr0n/Common.pm
perl/Sesse/pr0n/Index.pm

index 6c3d7e4110545bb2ac4d43c908df2cf0e0b7865b..098c9d36d22ea766ce6f828dc6f0633f15fa00a6 100644 (file)
@@ -152,6 +152,15 @@ sub pretty_escape {
        return $value;
 }
 
+sub pretty_unescape {
+       my $value = shift;
+
+       # URI unescaping is already done for us
+       $value =~ s/_/ /g;
+
+       return $value;
+}
+
 sub print_link {
        my ($r, $title, $baseurl, $param, $defparam, $accesskey) = @_;
        my $str = "<a href=\"$baseurl" . get_query_string($param, $defparam) . "\"";
index b5e0d113a277902caf3f3360d2989ed8aac9108c..4ec1426eeb163fa166b2074b4a112122eefd9d49 100644 (file)
@@ -98,8 +98,7 @@ sub handler {
                        $settings{$s} = $val;
                }
                if ($s eq "model" || $s eq "lens") {
-                       $val =~ s/_/ /g;
-                       $settings{$s} = $val;
+                       $settings{$s} = Sesse::pr0n::Common::pretty_unescape($val);
                }
        }