diff options
author | Yorhel <git@yorhel.nl> | 2011-01-01 16:55:20 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2011-01-01 16:55:20 +0100 |
commit | c488ba34c41d6311eb33d1c4ce48c8990bbec24e (patch) | |
tree | 862291f97163bacc4d0ad27d7dfd6d83e05ddbea | |
parent | 63005b274ccde96d8bdb36e7466ea5b0899b4151 (diff) |
Bugfix: properly escape search query in links query string
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | lib/VNDB/Handler/Releases.pm | 5 | ||||
-rw-r--r-- | lib/VNDB/Handler/VNBrowse.pm | 5 |
3 files changed, 7 insertions, 4 deletions
@@ -21,6 +21,7 @@ - Store l10n preference in the database for logged-in users - Bugfix: check for validness of form arguments on /[uv]+/votes - Bugfix: translate screen resolutions on release revision pages + - Bugfix: properly escape search query in links query string - Implemented permanent release/vn filters 2.15 - 2010-12-15 diff --git a/lib/VNDB/Handler/Releases.pm b/lib/VNDB/Handler/Releases.pm index 511db5b6..388df05a 100644 --- a/lib/VNDB/Handler/Releases.pm +++ b/lib/VNDB/Handler/Releases.pm @@ -510,13 +510,14 @@ sub browse { end; end; + my $uri = sprintf '/r?q=%s;fil=%s', uri_escape($f->{q}), $f->{fil}; $self->htmlBrowse( class => 'relbrowse', items => $list, options => $f, nextpage => $np, - pageurl => "/r?q=$f->{q};fil=$f->{fil};s=$f->{s};o=$f->{o}", - sorturl => "/r?q=$f->{q};fil=$f->{fil}", + pageurl => "$uri;s=$f->{s};o=$f->{o}", + sorturl => $uri, header => [ [ mt('_rbrowse_col_released'), 'released' ], [ mt('_rbrowse_col_minage'), 'minage' ], diff --git a/lib/VNDB/Handler/VNBrowse.pm b/lib/VNDB/Handler/VNBrowse.pm index 1060a256..8dba35aa 100644 --- a/lib/VNDB/Handler/VNBrowse.pm +++ b/lib/VNDB/Handler/VNBrowse.pm @@ -47,13 +47,14 @@ sub list { $self->htmlHeader(title => mt('_vnbrowse_title'), search => $f->{q}); + my $quri = uri_escape($f->{q}); form action => '/v/all', 'accept-charset' => 'UTF-8', method => 'get'; div class => 'mainbox'; h1 mt '_vnbrowse_title'; $self->htmlSearchBox('v', $f->{q}); p class => 'browseopts'; for ('all', 'a'..'z', 0) { - a href => "/v/$_?q=$f->{q};fil=$f->{fil}", $_ eq $char ? (class => 'optselected') : (), $_ eq 'all' ? mt('_char_all') : $_ ? uc $_ : '#'; + a href => "/v/$_?q=$quri;fil=$f->{fil}", $_ eq $char ? (class => 'optselected') : (), $_ eq 'all' ? mt('_char_all') : $_ ? uc $_ : '#'; } end; @@ -64,7 +65,7 @@ sub list { end; end; # /form - $self->htmlBrowseVN($list, $f, $np, "/v/$char?q=$f->{q};fil=$f->{fil}", $f->{fil} =~ /tag_inc-/); + $self->htmlBrowseVN($list, $f, $np, "/v/$char?q=$quri;fil=$f->{fil}", $f->{fil} =~ /tag_inc-/); $self->htmlFooter(prefs => ['filter_vn']); } |