fix(backend): fix e-mail character encoding (#8886)

* Improve e-mail base design

* Refine e-mail design

* Adjust e-mail snapshots

* Avoid early html encoding for all parameters in locals

* Avoid early html encoding for all '= t()'

* Avoid early html encoding for the remaining '='
This commit is contained in:
Wolfgang Huß 2025-09-11 16:18:15 +02:00 committed by GitHub
parent d437c6d7f4
commit 985a8c3720
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
32 changed files with 74 additions and 74 deletions

View File

@ -3,5 +3,5 @@ extend ../layout.pug
block content
.content
- var groupUrl = groupUrl
p= t('changedGroupMemberRole', { groupName })
a.button(href=groupUrl)= t('buttons.viewGroup')
p!= t('changedGroupMemberRole', { groupName })
a.button(href=groupUrl)!= t('buttons.viewGroup')

View File

@ -1 +1 @@
= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.changedGroupMemberRole')}`
!= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.changedGroupMemberRole')}`

View File

@ -2,7 +2,7 @@ extend ../layout.pug
block content
.content
p= t('chatMessageStart')
a.user(href=chattingUserUrl)= chattingUser
= t('chatMessageEnd')
a.button(href=chatUrl)= t('buttons.viewChat')
p!= t('chatMessageStart')
a.user(href=chattingUserUrl)!= chattingUser
!= t('chatMessageEnd')
a.button(href=chatUrl)!= t('buttons.viewChat')

View File

@ -1 +1 @@
= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.chatMessage')}`
!= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.chatMessage')}`

View File

@ -3,6 +3,6 @@ extend ../layout.pug
block content
.content
p
a.user(href=commenterUrl)= commenterName
= t('commentedOnPost', { postTitle})
a.button(href=commentUrl)= t('buttons.viewComment')
a.user(href=commenterUrl)!= commenterName
!= t('commentedOnPost', { postTitle})
a.button(href=commentUrl)!= t('buttons.viewComment')

View File

@ -1 +1 @@
= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.commentedOnPost')}`
!= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.commentedOnPost')}`

View File

@ -2,9 +2,9 @@ extend ../layout.pug
block content
.content
p= t('emailVerification.introduction')
a.button(href=actionUrl)= t('buttons.verifyEmail')
p= t('emailVerification.doNotChange')
p!= t('emailVerification.introduction')
a.button(href=actionUrl)!= t('buttons.verifyEmail')
p!= t('emailVerification.doNotChange')
p= t('emailVerification.codeHint')
span= nonce
p!= t('emailVerification.codeHint')
span!= nonce

View File

@ -1 +1 @@
= `${t('subjects.newEmail')} ${APPLICATION_NAME}`
!= `${t('subjects.newEmail')} ${APPLICATION_NAME}`

View File

@ -3,6 +3,6 @@ extend ../layout.pug
block content
.content
p
a.user(href=postAuthorUrl)= postAuthorName
= t('followedUserPosted', { postTitle })
a.button(href=postUrl)= t('buttons.viewPost')
a.user(href=postAuthorUrl)!= postAuthorName
!= t('followedUserPosted', { postTitle })
a.button(href=postUrl)!= t('buttons.viewPost')

View File

@ -1 +1 @@
= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.followedUserPosted')}`
!= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.followedUserPosted')}`

View File

@ -2,4 +2,4 @@ footer
.footer
- var organizationUrl = ORGANIZATION_URL
- var organizationName = ORGANIZATION_NAME
a(href=organizationUrl)= organizationName
a(href=organizationUrl)!= organizationName

View File

@ -4,14 +4,14 @@
- var team = APPLICATION_NAME
- var settingsUrl = settingsUrl
- var renderSettingsUrl = renderSettingsUrl
p.no-margin-top-bottom= t('general.seeYou')
a.organization(href=organizationUrl)= team
p.no-margin-top-bottom!= t('general.seeYou')
a.organization(href=organizationUrl)!= team
| !
p.no-margin-top-bottom= t('general.yourTeam', { team })
p.no-margin-top-bottom!= t('general.yourTeam', { team })
if renderSettingsUrl
br
p.no-margin-top-bottom= t('general.settingsHint')
a.settings(href=settingsUrl)= t('general.settingsName')
p.no-margin-top-bottom!= t('general.settingsHint')
a.settings(href=settingsUrl)!= t('general.settingsName')
| !

View File

@ -1 +1 @@
h2= `${t('general.greeting')} ${name},`
h2!= `${t('general.greeting')} ${name},`

View File

@ -1,2 +1,2 @@
p.no-margin-top-bottom= t('support')
a(href='mailto:' + supportEmail)= supportEmail
p.no-margin-top-bottom!= t('support')
a(href='mailto:' + supportEmail)!= supportEmail

View File

@ -1 +1 @@
h2= `${t('general.welcome')} ${APPLICATION_NAME}!`
h2!= `${t('general.welcome')} ${APPLICATION_NAME}!`

View File

@ -3,6 +3,6 @@ extend ../layout.pug
block content
.content
p
a.user(href=commenterUrl)= commenterName
= t('mentionedInComment', { postTitle})
a.button(href=commentUrl)= t('buttons.viewComment')
a.user(href=commenterUrl)!= commenterName
!= t('mentionedInComment', { postTitle})
a.button(href=commentUrl)!= t('buttons.viewComment')

View File

@ -1 +1 @@
= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.mentionedInComment')}`
!= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.mentionedInComment')}`

View File

@ -3,6 +3,6 @@ extend ../layout.pug
block content
.content
p
a.user(href=postAuthorUrl)= postAuthorName
= t('mentionedInPost', { postTitle })
a.button(href=postUrl)= t('buttons.viewPost')
a.user(href=postAuthorUrl)!= postAuthorName
!= t('mentionedInPost', { postTitle })
a.button(href=postUrl)!= t('buttons.viewPost')

View File

@ -1 +1 @@
= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.mentionedInPost')}`
!= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.mentionedInPost')}`

View File

@ -3,5 +3,5 @@ extend ../layout.pug
block content
.content
- var postUrl = postUrl
p= t('postInGroup', { postTitle})
a.button(href=postUrl)= t('buttons.viewPost')
p!= t('postInGroup', { postTitle})
a.button(href=postUrl)!= t('buttons.viewPost')

View File

@ -1 +1 @@
= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.postInGroup')}`
!= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.postInGroup')}`

View File

@ -2,14 +2,14 @@ extend ../layout.pug
block content
.content
p= t('registration.introduction')
a.button(href=actionUrl)= t('buttons.confirmEmail')
p= t('registration.codeHint')
span= nonce
p= t('registration.codeHintException')
p!= t('registration.introduction')
a.button(href=actionUrl)!= t('buttons.confirmEmail')
p!= t('registration.codeHint')
span!= nonce
p!= t('registration.codeHintException')
p= t('registration.notYouStart')
a(href=ORGANIZATION_LINK)= APPLICATION_NAME
= t('registration.notYouEnd')
p!= t('registration.notYouStart')
a(href=ORGANIZATION_LINK)!= APPLICATION_NAME
!= t('registration.notYouEnd')
p= t('registration.ps')
p!= t('registration.ps')

View File

@ -1 +1 @@
= `${t('general.welcome')} ${APPLICATION_NAME}`
!= `${t('general.welcome')} ${APPLICATION_NAME}`

View File

@ -2,4 +2,4 @@ extend ../layout.pug
block content
.content
p= t('removedUserFromGroup', { groupName })
p!= t('removedUserFromGroup', { groupName })

View File

@ -2,8 +2,8 @@ extend ../layout.pug
block content
.content
p= t('resetPassword.introduction')
a.button(href=actionUrl)= t('buttons.confirmEmail')
p= t('resetPassword.ignore')
p= t('resetPassword.codeHint')
span= nonce
p!= t('resetPassword.introduction')
a.button(href=actionUrl)!= t('buttons.confirmEmail')
p!= t('resetPassword.ignore')
p!= t('resetPassword.codeHint')
span!= nonce

View File

@ -1 +1 @@
= `${t('subjects.resetPassword')} ${APPLICATION_NAME}`
!= `${t('subjects.resetPassword')} ${APPLICATION_NAME}`

View File

@ -3,6 +3,6 @@ extend ../layout.pug
block content
.content
p
a.user(href=groupRelatedUserUrl)= groupRelatedUserName
= t('userJoinedGroup', { groupName })
a.button(href=groupUrl)= t('buttons.viewGroup')
a.user(href=groupRelatedUserUrl)!= groupRelatedUserName
!= t('userJoinedGroup', { groupName })
a.button(href=groupUrl)!= t('buttons.viewGroup')

View File

@ -1 +1 @@
= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.userJoinedGroup')}`
!= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.userJoinedGroup')}`

View File

@ -3,6 +3,6 @@ extend ../layout.pug
block content
.content
p
a.user(href=groupRelatedUserUrl)= groupRelatedUserName
= t('userLeftGroup', { groupName })
a.button(href=groupUrl)= t('buttons.viewGroup')
a.user(href=groupRelatedUserUrl)!= groupRelatedUserName
!= t('userLeftGroup', { groupName })
a.button(href=groupUrl)!= t('buttons.viewGroup')

View File

@ -1 +1 @@
= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.userLeftGroup')}`
!= `${APPLICATION_NAME} ${t('notification')}: ${t('subjects.userLeftGroup')}`

View File

@ -2,9 +2,9 @@ extend ../layout.pug
block content
.content
p= t('wrongEmail.introduction')
a.button(href=actionUrl)= t('buttons.tryAgain')
p!= t('wrongEmail.introduction')
a.button(href=actionUrl)!= t('buttons.tryAgain')
p= t('wrongEmail.ignoreStart')
a(href=ORGANIZATION_LINK)= APPLICATION_NAME
= t('wrongEmail.ignoreEnd')
p!= t('wrongEmail.ignoreStart')
a(href=ORGANIZATION_LINK)!= APPLICATION_NAME
!= t('wrongEmail.ignoreEnd')

View File

@ -1 +1 @@
= `${t('subjects.wrongEmail')} ${APPLICATION_NAME}`
!= `${t('subjects.wrongEmail')} ${APPLICATION_NAME}`