aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Template.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-06-29 15:00:55 +0100
committerM Somerville <matthew-github@dracos.co.uk>2020-11-11 10:28:23 +0000
commitce1b3ec61fdaa954c26e55b8ce8cd1ad619b3538 (patch)
tree3ab20e43f6bf6b4a0ca1284c019a26f5fe7a2ef5 /perllib/FixMyStreet/Template.pm
parent9292866fbc1be364a716ac9efb105a0350a2de72 (diff)
[Bromley] Add waste service lookup.
This creates an integration to view bin collection days, and placeholders for the start of a non-map property-based reporting flow.
Diffstat (limited to 'perllib/FixMyStreet/Template.pm')
-rw-r--r--perllib/FixMyStreet/Template.pm9
1 files changed, 8 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Template.pm b/perllib/FixMyStreet/Template.pm
index afb977ac9..275089a35 100644
--- a/perllib/FixMyStreet/Template.pm
+++ b/perllib/FixMyStreet/Template.pm
@@ -161,7 +161,6 @@ sub sanitize {
return $text;
}
-
=head2 email_sanitize_text
Intended for use in the _email_comment_list.txt template to allow HTML
@@ -291,4 +290,12 @@ sub _space_slash {
return $t;
}
+sub title : Filter {
+ my $text = shift;
+ $text =~ s{(\w[\w']*)}{\u\L$1}g;
+ # Postcode special handling
+ $text =~ s{(\w?\w\d[\d\w]?\s*\d\w\w)}{\U$1}g;
+ return $text;
+}
+
1;