mirror of
https://github.com/healthchecks/healthchecks.git
synced 2025-04-08 06:30:05 +00:00
Fix special character encoding in project invite emails
This commit is contained in:
parent
18c17fb4b5
commit
2bf0d0dbc5
3 changed files with 8 additions and 3 deletions
|
@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.
|
|||
- Fix the Signal integration to handle unexpected RPC messages better (#763)
|
||||
- Fix special character encoding in Signal notifications (#767)
|
||||
- Fix project sort order to be case-insensitive everywhere in the UI (#768)
|
||||
- Fix special character encoding in project invite emails
|
||||
|
||||
## v2.5 - 2022-12-14
|
||||
|
||||
|
|
|
@ -91,6 +91,10 @@ class ProjectTestCase(BaseTestCase):
|
|||
self.assertEqual(r.status_code, 403)
|
||||
|
||||
def test_it_adds_team_member(self):
|
||||
# Use "'" in the name to see if does or doesn't get escaped in email subject:
|
||||
self.project.name = "Alice's Project"
|
||||
self.project.save()
|
||||
|
||||
self.client.login(username="alice@example.org", password="password")
|
||||
|
||||
form = {"invite_team_member": "1", "email": "frank@example.org", "role": "w"}
|
||||
|
@ -111,8 +115,8 @@ class ProjectTestCase(BaseTestCase):
|
|||
self.assertFalse(member.user.project_set.exists())
|
||||
|
||||
# And an email should have been sent
|
||||
subj = f"You have been invited to join Alices Project on {settings.SITE_NAME}"
|
||||
self.assertHTMLEqual(mail.outbox[0].subject, subj)
|
||||
subj = f"You have been invited to join Alice's Project on {settings.SITE_NAME}"
|
||||
self.assertEqual(mail.outbox[0].subject, subj)
|
||||
|
||||
def test_it_adds_readonly_team_member(self):
|
||||
self.client.login(username="alice@example.org", password="password")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{% load hc_extras %}
|
||||
{% if inviting_project %}
|
||||
You have been invited to join {{ inviting_project }} on {% site_name %}
|
||||
You have been invited to join {{ inviting_project|safe }} on {% site_name %}
|
||||
{% else %}
|
||||
Log in to {% site_name %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Add table
Reference in a new issue