Skip to content

Commit

Permalink
Fixes oppia#1750: When sending emails, convert bullet points in html …
Browse files Browse the repository at this point in the history
…format to hyphens in text format.
  • Loading branch information
BojOnTheBeat authored and seanlip committed Apr 29, 2016
1 parent c1d069b commit 0a726ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/domain/email_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def _send_email(
return

raw_plaintext_body = cleaned_html_body.replace('<br/>', '\n').replace(
'<br>', '\n').replace('</p><p>', '</p>\n<p>')
'<br>', '\n').replace('<li>', '<li>- ').replace('</p><p>', '</p>\n<p>')
cleaned_plaintext_body = html_cleaner.strip_html_tags(raw_plaintext_body)

if email_models.SentEmailModel.check_duplicate_message(
Expand Down
12 changes: 6 additions & 6 deletions core/domain/email_manager_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ def test_correct_rights_are_written_in_manager_role_email_body(self):
', on Oppia.org.\n'
'\n'
'This allows you to:\n'
'Change the exploration permissions\n'
'Edit the exploration\n'
'View and playtest the exploration\n'
'- Change the exploration permissions\n'
'- Edit the exploration\n'
'- View and playtest the exploration\n'
'\n'
'You can find the exploration here.\n'
'\n'
Expand Down Expand Up @@ -274,8 +274,8 @@ def test_correct_rights_are_written_in_editor_role_email_body(self):
', on Oppia.org.\n'
'\n'
'This allows you to:\n'
'Edit the exploration\n'
'View and playtest the exploration\n'
'- Edit the exploration\n'
'- View and playtest the exploration\n'
'\n'
'You can find the exploration here.\n'
'\n'
Expand Down Expand Up @@ -337,7 +337,7 @@ def test_correct_rights_are_written_in_playtester_role_email_body(self):
', on Oppia.org.\n'
'\n'
'This allows you to:\n'
'View and playtest the exploration\n'
'- View and playtest the exploration\n'
'\n'
'You can find the exploration here.\n'
'\n'
Expand Down

0 comments on commit 0a726ac

Please sign in to comment.