aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm2
2 files changed, 3 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c9c4ea83e..3b9dd2caf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,7 @@
- Send login email button on user edit page #2041
- Use do-not-reply address for sent report email.
- Category group can be edited.
+ - Trim spaces from user/report search input.
- Bugfixes:
- Don't remove automated fields when editing contacts #2163
- Remove small border to left of Fixed banner. #2156
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 35f619c11..c77e5ccac 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -683,6 +683,7 @@ sub reports : Path('reports') {
return if $c->cobrand->call_hook(report_search_query => $query, $p_page, $u_page, $order);
if (my $search = $c->get_param('search')) {
+ $search = $self->trim($search);
$c->stash->{searched} = $search;
my $search_n = 0;
@@ -1264,6 +1265,7 @@ sub users: Path('users') : Args(0) {
my ( $self, $c ) = @_;
if (my $search = $c->get_param('search')) {
+ $search = $self->trim($search);
$c->stash->{searched} = $search;
my $isearch = '%' . $search . '%';