aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Template.pm
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2020-08-07 17:33:27 +0100
committerM Somerville <matthew-github@dracos.co.uk>2020-09-30 16:20:27 +0100
commitab983c0445fde36a5338b199c7d3996580872e7c (patch)
treedb5be7a17563921f4755bc1126427e4a37505469 /perllib/FixMyStreet/Template.pm
parentf63e2feb37cc9b1e5aca60d85be166fa84eb5f9f (diff)
Enable HTML in updates from staff users
This also extends to response templates.
Diffstat (limited to 'perllib/FixMyStreet/Template.pm')
-rw-r--r--perllib/FixMyStreet/Template.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Template.pm b/perllib/FixMyStreet/Template.pm
index 6317f7552..ac9e743ff 100644
--- a/perllib/FixMyStreet/Template.pm
+++ b/perllib/FixMyStreet/Template.pm
@@ -141,6 +141,8 @@ sub html_paragraph : Filter('html_para') {
sub sanitize {
my $text = shift;
+ $text = $$text if UNIVERSAL::isa($text, 'FixMyStreet::Template::SafeString');
+
my %allowed_tags = map { $_ => 1 } qw( p ul ol li br b i strong em );
my $scrubber = HTML::Scrubber->new(
rules => [