[Git][noosfero/noosfero][master] 2 commits: Adds html_safe on new article mail notification

Rodrigo Souto gitlab at mg.gitlab.com
Mon Apr 10 14:27:51 BRT 2017


Rodrigo Souto pushed to branch master at Noosfero / noosfero


Commits:
f383f85f by Gabriel Silva at 2017-04-03T04:44:42+00:00
Adds html_safe on new article mail notification

Signed-off-by: Gabriel Silva <gabriel93.silva at gmail.com>

- - - - -
880b1e66 by Rodrigo Souto at 2017-04-10T17:27:43+00:00
Merge branch 'content_summary_html_safe' into 'master'

Fixes escaped HTML in new article mail notification

See merge request !1160
- - - - -


1 changed file:

- app/views/person_notifier/mailer/_create_article.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
@@ -12,7 +12,7 @@
     <span style="font-size: 14px;"><%= link_to(activity.params['name'], activity.params['url'], :style => "color: #333; font-weight: bold; text-decoration: none;") %></span>
     <br/>
     <span title='<%= activity.target.class.short_description %>' class='profile-activity-icon icon-new icon-new<%= activity.target.class.icon_name %>'></span>
-    <%= image_tag(activity.params['first_image'], :style => 'max-width:100%;') unless activity.params['first_image'].blank? %><%= strip_tags(truncate(activity.params['lead'], :length => 1000, :ommision => '...')).gsub(/(\xC2\xA0|\s)+/, ' ').gsub(/^\s+/, '') unless activity.params['lead'].blank? %>
+    <%= image_tag(activity.params['first_image'], :style => 'max-width:100%;') unless activity.params['first_image'].blank? %><%= strip_tags(truncate(activity.params['lead'].html_safe, :length => 1000, :ommision => '...', :escape => false)).gsub(/(\xC2\xA0|\s)+/, ' ').gsub(/^\s+/, '') unless activity.params['lead'].blank? %>
     </p>
     <p><%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %></p>
   </td>



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/e8b2fb35592942b988c9bc8c99d656bc59c415c0...880b1e6676c756f75ba92db5794a84219b2ebdd9
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170410/77501b5f/attachment-0001.html>


More information about the Noosfero-dev mailing list