diff options
author | Yorhel <git@yorhel.nl> | 2010-11-21 16:25:16 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-11-21 16:25:16 +0100 |
commit | db700ac32533b611242a36e2dac772d8632af4ed (patch) | |
tree | 321e6d19fe1695dde755f65085bc924c61441a24 /lib/VNDB | |
parent | a79312bb341bdfbdf14e7aeb3d1ffa6548604960 (diff) |
Use ~ as value separator in the filter string, rather than a comma
It seems a comma has to be escaped in query string values. A ~ doesn't
and thus makes the URIs significantly shorter.
Diffstat (limited to 'lib/VNDB')
-rw-r--r-- | lib/VNDB/Func.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNDB/Func.pm b/lib/VNDB/Func.pm index a693e1de..810fe622 100644 --- a/lib/VNDB/Func.pm +++ b/lib/VNDB/Func.pm @@ -98,7 +98,7 @@ sub minage { sub fil_parse { return { map { my($f, $v) = split /-/, $_, 2; - my @v = split /,/, $v; + my @v = split /~/, $v; s/_([0-9]{2})/$1 > $#fil_escape ? '' : $fil_escape[$1]/eg for(@v); $f => @v > 1 ? \@v : @v } split /\./, scalar shift }; @@ -111,7 +111,7 @@ sub fil_serialize { return join '.', map { my @v = ref $fil->{$_} ? @{$fil->{$_}} : ($fil->{$_}); s/$e/_$fil_escape{$1}/g for(@v); - $_.'-'.join ',', @v + $_.'-'.join '~', @v } keys %$fil; } |