aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Template.pm
diff options
context:
space:
mode:
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;