Skip to content

Commit 1f15775

Browse files
authored
Fix email template title (#287)
* chore(tests): add beautiful soup for tests * test: ensure subject is passed through * feat(email template): pass subject through to be used in markup * chore: formatting * chore: mypy ignore * test(template_types): fix failing test * chore: bump version and waffles dep
1 parent a7f9f79 commit 1f15775

6 files changed

Lines changed: 163 additions & 5 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
docopt==0.6.2
22
Flask==2.3.3
33
markupsafe==2.1.4
4-
git+https://github.com/cds-snc/notifier-utils.git@52.1.6#egg=notifications-utils
4+
git+https://github.com/cds-snc/notifier-utils.git@52.1.7#egg=notifications-utils

notifications_utils/jinja_templates/email/email_template.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
77
<meta content="telephone=no" name="format-detection" /> <!-- need to add formatting for real phone numbers -->
88
<meta name="viewport" content="width=device-width" />
9-
<title>Page title</title>
9+
<title>{{ subject }}</title>
1010

1111
<style type="text/css">
1212
@media only screen and (min-device-width: 581px) {

notifications_utils/template.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ def preheader(self):
402402
def __str__(self):
403403
return self.jinja_template.render(
404404
{
405+
"subject": self.subject,
405406
"body": get_html_email_body(self.content, self.values, html="passthrough" if self.allow_html else "escape"),
406407
"preheader": self.preheader,
407408
"fip_banner_english": self.fip_banner_english,

0 commit comments

Comments
 (0)