[Git][noosfero/noosfero][master] should not escape html notification for article creation

Leandro Nunes gitlab at mg.gitlab.com
Wed Jul 13 18:01:59 BRT 2016


Leandro Nunes pushed to branch master at Noosfero / noosfero


Commits:
87bd3f7a by Leandro Nunes dos Santos at 2016-07-13T18:01:31-03:00
should not escape html notification for article creation

- - - - -


2 changed files:

- app/views/person_notifier/mailer/_create_article.html.erb
- app/views/person_notifier/mailer/content_summary.html.erb


Changes:

=====================================
app/views/person_notifier/mailer/_create_article.html.erb
=====================================
--- a/app/views/person_notifier/mailer/_create_article.html.erb
+++ b/app/views/person_notifier/mailer/_create_article.html.erb
@@ -5,7 +5,7 @@
   <td>
     <p>
     <span style="font-size: 14px;"><%= link_to activity.user.short_name(20), activity.user.url %></span>
-    <span style="font-size: 14px;"><%= _("has published on community %s") % link_to(activity.target.profile.short_name(20), activity.target.profile.url, :style => "color: #333; font-weight: bold; text-decoration: none;") if activity.target.profile.is_a?(Community) %></span>
+    <span style="font-size: 14px;"><%= _("has published on community %s").html_safe % link_to(activity.target.profile.short_name(20), activity.target.profile.url, :style => "color: #333; font-weight: bold; text-decoration: none;") if activity.target.profile.is_a?(Community) %></span>
     <span style="font-size: 10px; color: #929292; float:right;"><%= time_ago_in_words(activity.created_at) %></span>
     </p>
     <p>


=====================================
app/views/person_notifier/mailer/content_summary.html.erb
=====================================
--- a/app/views/person_notifier/mailer/content_summary.html.erb
+++ b/app/views/person_notifier/mailer/content_summary.html.erb
@@ -5,7 +5,7 @@
       <%= link_to @url, :style => "text-decoration: none;" do %>
         <span style="font-weight:bold;font-size: 28px;margin: 0;color: white;background-color: #AAAAAA;padding: 5px;"><%= @environment.name %></span>
       <% end %>
-      <span style="font-weight:bold;color: #333;font-size:19px;margin-left: 8px;"><%= _("%s's Notifications") % @profile.name %></h3>
+      <span style="font-weight:bold;color: #333;font-size:19px;margin-left: 8px;"><%= _("%s's Notifications").html_safe % @profile.name %></h3>
     </div>
     <div style="margin: 0 20px 20px 20px;border-top:1px solid #e2e2e2;">
       <% if @tasks.present? %>
@@ -34,7 +34,7 @@
 
       <div style="color:#444444;font-size:11px;margin-bottom: 20px;">
         <p style="margin:0"><%= _("Greetings,") %></p>
-        <p style="margin:0"><%= _('%s team.') % @environment.name %></p>
+        <p style="margin:0"><%= _('%s team.').html_safe % @environment.name %></p>
         <p style="margin:0"><%= link_to @url, url_for(@url) %></p>
       </div>
     </div>



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/87bd3f7aada1edb8622716b159ac1b38c5fa3f90
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160713/35b5ba8b/attachment-0001.html>


More information about the Noosfero-dev mailing list