diff options
author | Matthew Somerville <matthew@mysociety.org> | 2020-01-10 11:55:18 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2020-01-10 11:55:18 +0000 |
commit | 9d66124566ebe5d8348ceadfeb54a7dd389e308c (patch) | |
tree | 60cd399d677794b768060652c160233cf0b4d569 /perllib/Open311/PopulateServiceList.pm | |
parent | 89897e5912e5ba17318917f5290561473d9b64c1 (diff) | |
parent | ba9efbd5b0bca630ecd6299240992efc3422dfca (diff) |
Merge branch 'html-scrubber'
Diffstat (limited to 'perllib/Open311/PopulateServiceList.pm')
-rw-r--r-- | perllib/Open311/PopulateServiceList.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/perllib/Open311/PopulateServiceList.pm b/perllib/Open311/PopulateServiceList.pm index 7c4337b1a..3e987b7dd 100644 --- a/perllib/Open311/PopulateServiceList.pm +++ b/perllib/Open311/PopulateServiceList.pm @@ -246,7 +246,13 @@ sub _add_meta_to_contact { # turn the data into something a bit more friendly to use @meta = # remove trailing colon as we add this when we display so we don't want 2 - map { $_->{description} =~ s/:\s*$// if $_->{description}; $_ } + map { + if ($_->{description}) { + $_->{description} =~ s/:\s*$//; + $_->{description} = FixMyStreet::Template::sanitize($_->{description}); + } + $_ + } # there is a display order and we only want to sort once sort { ($a->{order} || 0) <=> ($b->{order} || 0) } @meta; |