diff options
author | Yorhel <git@yorhel.nl> | 2022-07-10 07:51:11 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2022-07-10 07:51:12 +0200 |
commit | c37d140ac85c55741f2e4031dac7e3513d6e1cda (patch) | |
tree | f970067bba8f4193feb272842b94fe7b963b1d59 /lib | |
parent | 055e526a9a0e8cdb54285eec0441c5a04b1281e4 (diff) |
TableOpts: Always query_encode the URL parameter
Even if it's equal to the global default, because the actual default
being used depends on stored user preferences.
Fixes https://vndb.org/t950.1307
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VNWeb/TableOpts.pm | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/VNWeb/TableOpts.pm b/lib/VNWeb/TableOpts.pm index 096d4109..8d0af29a 100644 --- a/lib/VNWeb/TableOpts.pm +++ b/lib/VNWeb/TableOpts.pm @@ -147,10 +147,7 @@ TUWF::set('custom_validations')->{tableopts} = sub { } } }; -sub query_encode { - my($v,$o) = $_[0]->@*; - $v == $o->{default} ? undef : _enc $v; -} +sub query_encode { _enc $_[0][0] } sub view { $views[$_[0][0] & 3] || $views[$_[0][1]{views}[0]] } sub rows { shift->view eq 'rows' } |