summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--lib/VNDB/Handler/Releases.pm5
-rw-r--r--lib/VNDB/Handler/VNBrowse.pm5
3 files changed, 7 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 526e106a..41f9359d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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']);
}