diff options
author | M Somerville <matthew-github@dracos.co.uk> | 2020-10-02 16:25:50 +0100 |
---|---|---|
committer | M Somerville <matthew-github@dracos.co.uk> | 2020-10-02 16:25:50 +0100 |
commit | 71abbedd5b0c6c7b0ae86b7ef75132fb68db6ff8 (patch) | |
tree | 311b274bb2998ac03a8b639faffc7b532c1ef2a0 /perllib/FixMyStreet/App/Controller | |
parent | c344dd774bc68dd1b9c7d41dc3c63c29ce4b3f42 (diff) | |
parent | bf90bf71fbac2c8e1be96646715182f876eccd57 (diff) |
Merge branch '3167-strip-space-middle'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin/Bodies.pm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin/Bodies.pm b/perllib/FixMyStreet/App/Controller/Admin/Bodies.pm index f88ad0051..670336c14 100644 --- a/perllib/FixMyStreet/App/Controller/Admin/Bodies.pm +++ b/perllib/FixMyStreet/App/Controller/Admin/Bodies.pm @@ -252,8 +252,12 @@ sub update_contact : Private { } my $email = $c->get_param('email'); - $email =~ s/\s+//g; my $send_method = $c->get_param('send_method') || $contact->body->send_method || ""; + if ($send_method eq 'Open311') { + $email =~ s/^\s+|\s+$//g; + } else { + $email =~ s/\s+//g; + } my $email_unchanged = $contact->email && $email && $contact->email eq $email; my $cobrand = $contact->body->get_cobrand_handler; my $cobrand_valid = $cobrand && $cobrand->call_hook(validate_contact_email => $email); |