diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-04-13 14:29:56 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-04-13 14:35:58 +0100 |
commit | 112ab20142f7f79d4ffff557b95c53406ad79bd9 (patch) | |
tree | 20f32e6faa1449c6345a8ffeb428dfc440cfddee /perllib/FixMyStreet/App/Controller/My.pm | |
parent | cfe97d706f5cb7b3f3ca6d9227a872a7e50d97b2 (diff) |
Fix issue with categories with regex characters.
As the templates were using `grep`, they failed to match on a category
such as "Footpaths (right of way)". Changing the stash variables to be
hashes instead of lists makes checking for a key simpler. Fixes #1688.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/My.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/My.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/My.pm b/perllib/FixMyStreet/App/Controller/My.pm index ffcdf829d..77711f807 100644 --- a/perllib/FixMyStreet/App/Controller/My.pm +++ b/perllib/FixMyStreet/App/Controller/My.pm @@ -111,7 +111,7 @@ sub get_problems : Private { my $categories = [ $c->get_param_list('filter_category', 1) ]; if ( @$categories ) { $params->{category} = $categories; - $c->stash->{filter_category} = $categories; + $c->stash->{filter_category} = { map { $_ => 1 } @$categories }; } my $rows = 50; |