[Git][noosfero/noosfero][master] newsletter: prevent html_safe on nil

Victor Costa gitlab at mg.gitlab.com
Wed Feb 8 10:08:40 BRST 2017


Victor Costa pushed to branch master at Noosfero / noosfero


Commits:
17cd5dd3 by Victor Costa at 2017-02-08T09:06:57-03:00
newsletter: prevent html_safe on nil

- - - - -


1 changed file:

- plugins/newsletter/lib/newsletter_plugin/newsletter.rb


Changes:

=====================================
plugins/newsletter/lib/newsletter_plugin/newsletter.rb
=====================================
--- a/plugins/newsletter/lib/newsletter_plugin/newsletter.rb
+++ b/plugins/newsletter/lib/newsletter_plugin/newsletter.rb
@@ -136,7 +136,7 @@ class NewsletterPlugin::Newsletter < ApplicationRecord
         else
           post_without_image(post)
         end
-      end.join().html_safe+content_tag(:tr, content_tag(:td, self.footer.html_safe, :colspan => 2)),:style => CSS['breakingnews']).html_safe+content_tag(:div,message_to_unsubscribe, :style => CSS['newsletter-unsubscribe']),:style => CSS['breakingnews-wrap']).html_safe
+      end.join().html_safe+content_tag(:tr, content_tag(:td, (self.footer || "").html_safe, :colspan => 2)),:style => CSS['breakingnews']).html_safe+content_tag(:div,message_to_unsubscribe, :style => CSS['newsletter-unsubscribe']),:style => CSS['breakingnews-wrap']).html_safe
   end
 
   def default_subject



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/17cd5dd3fe461c144f5667e9e5b7cd402fba5e65
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170208/6eb1d20f/attachment.html>


More information about the Noosfero-dev mailing list