diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-06-07 14:05:58 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-06-07 14:31:50 +0100 |
commit | 6ce99025aa1c34335ebe25b0d033489433697c6e (patch) | |
tree | aace3b9ec65d1e3d10aa19d7193bb0af76d21854 | |
parent | 1cddfa67f21e876b90078af40f6b1c589315d451 (diff) |
Strip line end spaces in emails.
-rw-r--r-- | perllib/FixMyStreet/Email.pm | 1 | ||||
-rw-r--r-- | t/app/helpers/send_email_sample.txt | 2 | ||||
-rw-r--r-- | t/app/helpers/send_email_sample_mime.txt | 2 | ||||
-rw-r--r-- | templates/email/fixmystreet/signature.txt | 2 |
4 files changed, 4 insertions, 3 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); diff --git a/t/app/helpers/send_email_sample.txt b/t/app/helpers/send_email_sample.txt index 05303f4b4..68fe61f0e 100644 --- a/t/app/helpers/send_email_sample.txt +++ b/t/app/helpers/send_email_sample.txt @@ -22,5 +22,5 @@ t esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupi= datat non proident, sunt in culpa qui officia deserunt mollit anim id est l= aborum. -Yours,=20=20 +Yours, FixMyStreet.= diff --git a/t/app/helpers/send_email_sample_mime.txt b/t/app/helpers/send_email_sample_mime.txt index cbfe12b29..7b4ce91f6 100644 --- a/t/app/helpers/send_email_sample_mime.txt +++ b/t/app/helpers/send_email_sample_mime.txt @@ -27,7 +27,7 @@ t esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupi= datat non proident, sunt in culpa qui officia deserunt mollit anim id est l=
aborum.
-Yours,=20=20
+Yours,
FixMyStreet.=
--BOUNDARY
diff --git a/templates/email/fixmystreet/signature.txt b/templates/email/fixmystreet/signature.txt index 14b7d83e7..834e69b9d 100644 --- a/templates/email/fixmystreet/signature.txt +++ b/templates/email/fixmystreet/signature.txt @@ -2,7 +2,7 @@ All the best, The FixMyStreet team -https://www.FixMyStreet.com +https://www.FixMyStreet.com Twitter: https://twitter.com/FixMyStreet Facebook: http://www.facebook.com/fixmystreet |