aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Email.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-06-07 14:05:58 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-06-07 14:31:50 +0100
commit6ce99025aa1c34335ebe25b0d033489433697c6e (patch)
treeaace3b9ec65d1e3d10aa19d7193bb0af76d21854 /perllib/FixMyStreet/Email.pm
parent1cddfa67f21e876b90078af40f6b1c589315d451 (diff)
Strip line end spaces in emails.
Diffstat (limited to 'perllib/FixMyStreet/Email.pm')
-rw-r--r--perllib/FixMyStreet/Email.pm1
1 files changed, 1 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Email.pm b/perllib/FixMyStreet/Email.pm
index 3d363f80d..ce7dad47a 100644
--- a/perllib/FixMyStreet/Email.pm
+++ b/perllib/FixMyStreet/Email.pm
@@ -187,6 +187,7 @@ sub construct_email ($) {
# regex means, "replace any line ending that is neither preceded (?<!\n)
# nor followed (?!\n) by a blank line with a single space".
$body =~ s#(?<!\n)(?<! )\n(?!\n)# #gs;
+ $body =~ s# +$##mg;
$p->{Subject} = $subject if defined($subject);