Skip to content

Commit

Permalink
Fix encoding of body in the email template
Browse files Browse the repository at this point in the history
  • Loading branch information
arteymix committed Dec 12, 2023
1 parent c9412e3 commit 4f36dcd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ AbstractUserDetailsAuthenticationProvider.credentialsExpired=User credentials ha

# when a domain is not allowed, those are used to prefill the contact email
# {0} contains the domain part
LoginController.domainNotAllowedSubject=Attempting to register with {0} as an email domain is not allowed
LoginController.domainNotAllowedSubject=Register with an email address from {0}
# {0} contains the email address, {1} contains the domain part and {2} contains the user's full name
LoginController.domainNotAllowedBody=Hello!\n\
\n\
I am trying to register {0} and it appears that {1} is not in your allowed list of email domains. Could you please \
include it?\n\
I am trying to register with {0} and it appears that {1} is not an allowed email provider. Could you please include \
it?\n\
\n\
Best,\n\
{2}
Expand Down
5 changes: 3 additions & 2 deletions src/main/resources/templates/registration.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ <h4 class="form-signin-heading"><a th:href="@{/login}" th:text="#{rdp.site.fulln
<h6 class="form-signin-subheading">Researcher Registry</h6>
<div th:replace="layouts/login::message"></div>
<div th:if="${domainNotAllowed}" class="alert alert-danger">
Yikes! It looks like your email does not belong to an allowed provider. If you think this is a mistake,
<a th:href="@{mailto:__${@siteSettings.contactEmail}__?from=__${domainNotAllowedFrom}__&subject=__${domainNotAllowedSubject}__&body=__${domainNotAllowedBody}__}">
Yikes! It looks like your email address was not issued from an allowed provider. If you think this is a
mistake,
<a th:href="@{mailto:__${@siteSettings.contactEmail}__(from=${domainNotAllowedFrom},subject=${domainNotAllowedSubject},body=${domainNotAllowedBody})}">
contact us
</a>
so that we can complete your registration.
Expand Down

0 comments on commit 4f36dcd

Please sign in to comment.