From d871bb9eaec28d7fb1856f4701f35e3d5aa300b9 Mon Sep 17 00:00:00 2001
From: taitus
Date: Tue, 10 May 2022 16:51:41 +0200
Subject: [PATCH] Unify render "quotes" on emails
This section was being displayed differently in each mailing. We are trying
to unify it so that they are displayed the same.
---
app/views/mailer/budget_investment_unfeasible.html.erb | 2 +-
app/views/mailer/comment.html.erb | 6 +++---
app/views/mailer/evaluation_comment.html.erb | 6 ++++--
app/views/mailer/reply.html.erb | 2 +-
4 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/app/views/mailer/budget_investment_unfeasible.html.erb b/app/views/mailer/budget_investment_unfeasible.html.erb
index e31f59b7a..b20d1e421 100644
--- a/app/views/mailer/budget_investment_unfeasible.html.erb
+++ b/app/views/mailer/budget_investment_unfeasible.html.erb
@@ -4,7 +4,7 @@
<%= t("mailers.budget_investment_unfeasible.hi") %>
-
+
<%= @investment.unfeasibility_explanation %>
diff --git a/app/views/mailer/comment.html.erb b/app/views/mailer/comment.html.erb
index 44c4af83e..7a08045b5 100644
--- a/app/views/mailer/comment.html.erb
+++ b/app/views/mailer/comment.html.erb
@@ -13,9 +13,9 @@
<%= link_to @commentable.title, commentable_url(@commentable), style: "color: #2895F1; text-decoration:none;" %>
-
- <%= sanitize_and_auto_link @comment.body %>
-
+
+ <%= simple_format sanitize_and_auto_link(@comment.body), {}, sanitize: false %>
+
<%= sanitize(t("mailers.config.unsubscribe_text",
diff --git a/app/views/mailer/evaluation_comment.html.erb b/app/views/mailer/evaluation_comment.html.erb
index 4feafc181..8eb277d9c 100644
--- a/app/views/mailer/evaluation_comment.html.erb
+++ b/app/views/mailer/evaluation_comment.html.erb
@@ -16,8 +16,10 @@
)) %>
- <%= t("mailers.evaluation_comment.commenter_info", commenter: @email.comment.author.name, time: l(@email.comment.created_at)) %>
-
+
+ <%= t("mailers.evaluation_comment.commenter_info", commenter: @email.comment.author.name, time: l(@email.comment.created_at)) %>
+
+
<%= simple_format sanitize_and_auto_link(@email.comment.body), {}, sanitize: false %>
diff --git a/app/views/mailer/reply.html.erb b/app/views/mailer/reply.html.erb
index 2aa9f2f75..5a13c9687 100644
--- a/app/views/mailer/reply.html.erb
+++ b/app/views/mailer/reply.html.erb
@@ -13,7 +13,7 @@
<%= link_to @email.commentable.title, comment_url(@email.reply.id), style: "color: #2895F1; text-decoration:none;" %>
-
+
<%= simple_format sanitize_and_auto_link(@email.reply.body), {}, sanitize: false %>