aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin.pm5
-rw-r--r--t/app/controller/admin.t1
3 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fb8783ce4..88aa8f927 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -23,6 +23,7 @@
- Always allow reports to be removed from shortlist #1882
- Remove shortlist form from inspect duplicate list.
- Fix pin size when JavaScript unavailable.
+ - Fix display of text only body contacts #1895
- Admin improvements:
- Character length limit can be placed on report detailed information #1848
- Inspector panel shows nearest address if available #1850
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm
index 453ebed82..05953974e 100644
--- a/perllib/FixMyStreet/App/Controller/Admin.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin.pm
@@ -608,9 +608,12 @@ sub edit_body : Chained('body') : PathPart('') : Args(0) {
$c->set_param('posted', '');
$c->forward('fetch_translations');
- $c->forward('fetch_contacts');
+ # don't set this last as fetch_contacts might over-ride it
+ # to display email addresses as text
$c->stash->{template} = 'admin/body.html';
+ $c->forward('fetch_contacts');
+
return 1;
}
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index b4fb54686..b63229444 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -289,6 +289,7 @@ subtest 'check text output' => sub {
$mech->get_ok('/admin/body/' . $body->id . '?text=1');
is $mech->content_type, 'text/plain';
$mech->content_contains('test category');
+ $mech->content_lacks('<body');
};