Skip to content

Commit 4a59ea6

Browse files
committed
Fix issue where links were being escaped
1 parent 24f10cc commit 4a59ea6

5 files changed

Lines changed: 7 additions & 6 deletions

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<b>
22
Confirm Account:
3-
<a href="{{link}}">here</a>
3+
<a href="{{{link}}}">here</a>
44
</b>

assets/email/AccountInvitation.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<b>
22
Create Your Account:
3-
<a href="{{link}}">here</a>
3+
<a href="{{{link}}}">here</a>
44
</b>

assets/email/ResetPassword.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<b>
22
Reset password:
3-
<a href="{{link}}">here</a>
3+
<a href="{{{link}}}">here</a>
44
</b>

assets/email/test.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<div>This is used for testing email service. DO NOT REMOVE.{{TEST}}</div>
1+
<div>This is used for testing email service. DO NOT REMOVE.{{TEST}}. <a href="{{{NOT_ESCAPED}}}">link</a></div>

tests/email.service.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ describe("Email Service", function () {
4747
it("It should compile a handlebars email", (done) => {
4848
const handlebarPath = path.join(__dirname, `../assets/email/test.hbs`);
4949
const rendered = EmailService.renderEmail(handlebarPath, {
50-
TEST: "TESTTEST"
50+
TEST: "TESTTEST",
51+
NOT_ESCAPED: "localhost:1337/reset?token=lala"
5152
});
52-
assert.equal("<div>This is used for testing email service. DO NOT REMOVE.TESTTEST</div>", rendered);
53+
assert.equal('<div>This is used for testing email service. DO NOT REMOVE.TESTTEST. <a href="localhost:1337/reset?token=lala">link</a></div>', rendered);
5354
done();
5455
});
5556
});

0 commit comments

Comments
 (0)