From d0224d190324a625863576d58e1cace60a2d9f7c Mon Sep 17 00:00:00 2001 From: taitus Date: Wed, 4 May 2022 16:06:00 +0200 Subject: [PATCH] Add attributes for sanitize on unsubscribe link section In the comments and direct message emails, the "attributes" was missing and in the reply email it was not in the right place. --- app/views/mailer/comment.html.erb | 2 +- app/views/mailer/direct_message_for_receiver.html.erb | 3 ++- app/views/mailer/newsletter.html.erb | 2 +- app/views/mailer/reply.html.erb | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/views/mailer/comment.html.erb b/app/views/mailer/comment.html.erb index d831b60bc..44c4af83e 100644 --- a/app/views/mailer/comment.html.erb +++ b/app/views/mailer/comment.html.erb @@ -25,6 +25,6 @@ style: "color: #2895F1; text-decoration: none;" ), notification: User.human_attribute_name(:email_on_comment) - )) %> + ), attributes: %w[href style]) %>

diff --git a/app/views/mailer/direct_message_for_receiver.html.erb b/app/views/mailer/direct_message_for_receiver.html.erb index c24b071e6..4490113b3 100644 --- a/app/views/mailer/direct_message_for_receiver.html.erb +++ b/app/views/mailer/direct_message_for_receiver.html.erb @@ -25,6 +25,7 @@ <%= sanitize(t("mailers.direct_message_for_receiver.unsubscribe_text", notifications: link_to(t("mailers.config.notifications_link"), edit_subscriptions_url(token: @token), - style: "color: #2895F1; text-decoration: none;"))) %> + style: "color: #2895F1; text-decoration: none;")), + attributes: %w[href style]) %>

diff --git a/app/views/mailer/newsletter.html.erb b/app/views/mailer/newsletter.html.erb index e28be0eea..33df7aa93 100644 --- a/app/views/mailer/newsletter.html.erb +++ b/app/views/mailer/newsletter.html.erb @@ -11,6 +11,6 @@ style: "color: #2895F1; text-decoration: none;" ), notification: User.human_attribute_name(:newsletter) - )) %> + ), attributes: %w[href style]) %>

diff --git a/app/views/mailer/reply.html.erb b/app/views/mailer/reply.html.erb index ac1b7ee55..2aa9f2f75 100644 --- a/app/views/mailer/reply.html.erb +++ b/app/views/mailer/reply.html.erb @@ -25,6 +25,6 @@ style: "color: #2895F1; text-decoration: none;" ), notification: User.human_attribute_name(:email_on_comment_reply) - )) %> + ), attributes: %w[href style]) %>