aboutsummaryrefslogtreecommitdiffstats
path: root/t/app/controller
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-12-05 15:55:20 +0000
committerMatthew Somerville <matthew@mysociety.org>2020-01-09 10:57:25 +0000
commitba9efbd5b0bca630ecd6299240992efc3422dfca (patch)
tree0ca290ee8e9b399e7dc5fd42adbed7161c79a06b /t/app/controller
parentc4961f186e1bf5b9f14fa51e99c37bc013dd8e37 (diff)
Scrub admin description fields.
Diffstat (limited to 't/app/controller')
-rw-r--r--t/app/controller/admin/bodies.t4
-rw-r--r--t/app/controller/admin/reportextrafields.t2
2 files changed, 3 insertions, 3 deletions
diff --git a/t/app/controller/admin/bodies.t b/t/app/controller/admin/bodies.t
index 2d09ee85e..340351473 100644
--- a/t/app/controller/admin/bodies.t
+++ b/t/app/controller/admin/bodies.t
@@ -236,13 +236,13 @@ subtest 'disable form message editing' => sub {
$mech->get_ok('/admin/body/' . $body->id . '/test%20category');
$mech->submit_form_ok( { with_fields => {
disable => 1,
- disable_message => 'Please ring us!',
+ disable_message => '<em>Please</em> <u>ring</u> us on <a href="tel:01234">01234</a>, click <a href="javascript:bad">bad</a>',
note => 'Adding emergency message',
} } );
$mech->content_contains('Values updated');
my $contact = $body->contacts->find({ category => 'test category' });
is_deeply $contact->get_extra_fields, [{
- description => 'Please ring us!',
+ description => '<em>Please</em> ring us on <a href="tel:01234">01234</a>, click <a>bad</a>',
code => '_fms_disable_',
protected => 'true',
variable => 'false',
diff --git a/t/app/controller/admin/reportextrafields.t b/t/app/controller/admin/reportextrafields.t
index 388cc3c95..dede25207 100644
--- a/t/app/controller/admin/reportextrafields.t
+++ b/t/app/controller/admin/reportextrafields.t
@@ -68,7 +68,7 @@ FixMyStreet::override_config {
"metadata[9999].code" => "string_test",
"metadata[9999].required" => 1,
"metadata[9999].behaviour" => "question",
- "metadata[9999].description" => "this is a test description",
+ "metadata[9999].description" => "<div style='foo'>this is a test description</div>",
"metadata[9999].datatype" => "string",
"note" => "Added extra field",
}});