]> source.dussan.org Git - gitea.git/commit
Try to prevent autolinking of displaynames by email readers (#19169) (#19183)
authorzeripath <art27@cantab.net>
Wed, 23 Mar 2022 13:18:11 +0000 (13:18 +0000)
committerGitHub <noreply@github.com>
Wed, 23 Mar 2022 13:18:11 +0000 (15:18 +0200)
commitbb0e2121a3f060601e6f5cf2d201f44588d8bf21
tree22b1c82dee01558b25e1b54cae606315567be23b
parentd21b7fd3af2bd9081c704c9dcfe7a6f0831ddedd
Try to prevent autolinking of displaynames by email readers (#19169) (#19183)

Backport #19169

Unfortunately many email readers will (helpfully) detect url or url-like names and
automatically create links to them, even in HTML emails. This is not ideal when
usernames can have dots in them.

This PR tries to prevent this behaviour by sticking ZWJ characters between dots and
also set the meta tag to prevent format detection.

Not every email template has been changed in this way - just the activation emails but
it may be that we should be setting the above meta tag in all of our emails too.

Signed-off-by: Andrew Thornton <art27@cantab.net>
modules/templates/helper.go
services/mailer/mail.go
services/mailer/mail_release.go
services/mailer/mail_repo.go
templates/mail/auth/activate.tmpl
templates/mail/auth/activate_email.tmpl
templates/mail/auth/register_notify.tmpl
templates/mail/auth/reset_passwd.tmpl