From f9ac5b327a2bfc03f1779c0baf344dcbced4931a Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Fri, 17 May 2024 10:10:33 +0000 Subject: [PATCH] Remove `title` from email heads (#3810) One part of https://codeberg.org/forgejo/forgejo/pulls/3316, though it may have a little more files touched because I re-created the changes. > Removed HTML `` part in `<head>` that was present inconsistently in these emails. It doesn't appear to be used by other websites. After all, these are emails, not webpages. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3810 Reviewed-by: Otto <otto@codeberg.org> --- options/locale/locale_en-US.ini | 4 ---- services/mailer/mail_test.go | 1 - templates/mail/auth/activate.tmpl | 1 - templates/mail/auth/activate_email.tmpl | 1 - templates/mail/auth/register_notify.tmpl | 1 - templates/mail/auth/reset_passwd.tmpl | 1 - templates/mail/issue/assigned.tmpl | 1 - templates/mail/issue/default.tmpl | 1 - templates/mail/notify/admin_new_user.tmpl | 1 - templates/mail/notify/collaborator.tmpl | 1 - templates/mail/notify/repo_transfer.tmpl | 1 - templates/mail/release.tmpl | 1 - 12 files changed, 15 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 12c4197c6..2e4d154b7 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -473,12 +473,10 @@ link_not_working_do_paste = Does the link not work? Try copying and pasting it i hi_user_x = Hi <b>%s</b>, activate_account = Please activate your account -activate_account.title = %s, please activate your account activate_account.text_1 = Hi <b>%[1]s</b>, thanks for registering at %[2]s! activate_account.text_2 = Please click the following link to activate your account within <b>%s</b>: activate_email = Verify your email address -activate_email.title = %s, please verify your email address activate_email.text = Please click the following link to verify your email address within <b>%s</b>: admin.new_user.subject = New user %s just signed up @@ -486,13 +484,11 @@ admin.new_user.user_info = User information admin.new_user.text = Please <a href="%s">click here</a> to manage this user from the admin panel. register_notify = Welcome to Forgejo -register_notify.title = %[1]s, welcome to %[2]s register_notify.text_1 = this is your registration confirmation email for %s! register_notify.text_2 = You can sign into your account using your username: %s register_notify.text_3 = If someone else made this account for you, you will need to <a href="%s">set your password</a> first. reset_password = Recover your account -reset_password.title = %s, we have received a request to recover your account reset_password.text = If this was you, please click the following link to recover your account within <b>%s</b>: register_success = Registration successful diff --git a/services/mailer/mail_test.go b/services/mailer/mail_test.go index d87c57ffe..528b11f16 100644 --- a/services/mailer/mail_test.go +++ b/services/mailer/mail_test.go @@ -36,7 +36,6 @@ const bodyTpl = ` <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>{{.Subject}} diff --git a/templates/mail/auth/activate.tmpl b/templates/mail/auth/activate.tmpl index b1bb4cb46..eb7ea5a8e 100644 --- a/templates/mail/auth/activate.tmpl +++ b/templates/mail/auth/activate.tmpl @@ -3,7 +3,6 @@ - {{.locale.Tr "mail.activate_account.title" (.DisplayName|DotEscape)}} {{$activate_url := printf "%suser/activate?code=%s" AppUrl (QueryEscape .Code)}} diff --git a/templates/mail/auth/activate_email.tmpl b/templates/mail/auth/activate_email.tmpl index 3d32f80a4..9ca54d308 100644 --- a/templates/mail/auth/activate_email.tmpl +++ b/templates/mail/auth/activate_email.tmpl @@ -3,7 +3,6 @@ - {{.locale.Tr "mail.activate_email.title" (.DisplayName|DotEscape)}} {{$activate_url := printf "%suser/activate_email?code=%s&email=%s" AppUrl (QueryEscape .Code) (QueryEscape .Email)}} diff --git a/templates/mail/auth/register_notify.tmpl b/templates/mail/auth/register_notify.tmpl index 62dbf7d92..d3a668b0e 100644 --- a/templates/mail/auth/register_notify.tmpl +++ b/templates/mail/auth/register_notify.tmpl @@ -3,7 +3,6 @@ - {{.locale.Tr "mail.register_notify.title" (.DisplayName|DotEscape) AppName}} {{$set_pwd_url := printf "%[1]suser/forgot_password" AppUrl}} diff --git a/templates/mail/auth/reset_passwd.tmpl b/templates/mail/auth/reset_passwd.tmpl index 55b1ecec3..b85b770d8 100644 --- a/templates/mail/auth/reset_passwd.tmpl +++ b/templates/mail/auth/reset_passwd.tmpl @@ -3,7 +3,6 @@ - {{.locale.Tr "mail.reset_password.title" (.DisplayName|DotEscape)}} {{$recover_url := printf "%suser/recover_account?code=%s" AppUrl (QueryEscape .Code)}} diff --git a/templates/mail/issue/assigned.tmpl b/templates/mail/issue/assigned.tmpl index 5720319ee..f8ad62ae5 100644 --- a/templates/mail/issue/assigned.tmpl +++ b/templates/mail/issue/assigned.tmpl @@ -5,7 +5,6 @@ .footer { font-size:small; color:#666;} - {{.Subject}} {{$repo_url := HTMLFormat "%s" .Issue.Repo.HTMLURL .Issue.Repo.FullName}} diff --git a/templates/mail/issue/default.tmpl b/templates/mail/issue/default.tmpl index 395b118d3..a94a10e27 100644 --- a/templates/mail/issue/default.tmpl +++ b/templates/mail/issue/default.tmpl @@ -2,7 +2,6 @@ - {{.Subject}} - {{.Subject}} diff --git a/templates/mail/notify/repo_transfer.tmpl b/templates/mail/notify/repo_transfer.tmpl index 8c8b27648..bc4c4b366 100644 --- a/templates/mail/notify/repo_transfer.tmpl +++ b/templates/mail/notify/repo_transfer.tmpl @@ -2,7 +2,6 @@ - {{.Subject}} {{$url := HTMLFormat "%[2]s" .Link .Repo}} diff --git a/templates/mail/release.tmpl b/templates/mail/release.tmpl index 92af3216b..8c01aec20 100644 --- a/templates/mail/release.tmpl +++ b/templates/mail/release.tmpl @@ -2,7 +2,6 @@ - {{.Subject}}