diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-06-21 11:26:07 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-07-02 14:04:00 +0100 |
commit | a291045d4474e7c78d6905a0c83b251dcdfcc552 (patch) | |
tree | e3f0004350efa8ee340775024175eb73426f5a32 | |
parent | 3dd1d1f2cb68b731d23ecea9eb580fe08a190ce8 (diff) |
Maintain formatting in email report/update lists.
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | templates/email/default/_email_comment_list.html | 2 | ||||
-rw-r--r-- | templates/email/default/_email_report_list.html | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b94191ac..b3b0b3c8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ - Front end improvements: - Improved 403 message, especially for private reports. - Mobile users can now filter the pins on the `/around` map view. #2366 + - Maintain whitespace formatting in email report/update lists. - Admin improvements: - Add new roles system, to group permissions and apply to users. - New features: diff --git a/templates/email/default/_email_comment_list.html b/templates/email/default/_email_comment_list.html index efbb3e8da..49076c2b3 100644 --- a/templates/email/default/_email_comment_list.html +++ b/templates/email/default/_email_comment_list.html @@ -5,7 +5,7 @@ <img style="[% list_item_photo_style %]" src="[% inline_image(update.get_first_image_fp) %]" alt=""> </a> [%~ END %] - <p style="[% list_item_p_style %]">“[% update.item_text | html %]”</p> + [% update.item_text | html_para | replace('<p>', '<p style="' _ list_item_p_style _ '">“') %] <p style="[% list_item_date_style %]"> [%~ update.item_name | html IF update.item_name AND NOT update.item_anonymous -%] [% '(' _ cobrand.prettify_dt(update.confirmed) _ ') ' IF cobrand.include_time_in_update_alerts -%] diff --git a/templates/email/default/_email_report_list.html b/templates/email/default/_email_report_list.html index 5f7f67864..5a43ce7ea 100644 --- a/templates/email/default/_email_report_list.html +++ b/templates/email/default/_email_report_list.html @@ -10,7 +10,7 @@ [%~ report.title | html ~%] </a> </h2> - <p style="[% list_item_p_style %]">[% report.detail | html %]</p> + [% report.detail | html_para | replace('<p>', '<p style="' _ list_item_p_style _ '">') %] <p style="[% list_item_date_style %]"> [% cobrand.prettify_dt( report.confirmed ) %]. [% report.nearest %] |