Browse Source
Fix special character encoding in project invite emails
pull/770/head
Pēteris Caune
1 year ago
No known key found for this signature in database
GPG Key ID: E28D7679E9A9EDE2
3 changed files with
8 additions and
3 deletions
-
CHANGELOG.md
-
hc/accounts/tests/test_project.py
-
templates/emails/login-subject.html
|
|
@ -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 %} |