[Git][noosfero/noosfero][stable-1.7] Merge branch 'content_summary_html_safe' into 'master'

Rodrigo Souto gitlab at mg.gitlab.com
Mon Apr 10 14:28:08 BRT 2017


Rodrigo Souto pushed to branch stable-1.7 at Noosfero / noosfero


Commits:
02838aac by Rodrigo Souto at 2017-04-10T17:28:01+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/commit/02838aac25fbab9433c39ea213313fca8d58d4e7
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170410/09f1efe7/attachment.html>


More information about the Noosfero-dev mailing list