[Git][noosfero/noosfero][master] 2 commits: Sets some blog_helper strings as html_safe

Bráulio Bhavamitra gitlab at mg.gitlab.com
Tue May 3 20:16:57 BRT 2016


Bráulio Bhavamitra pushed to branch master at Noosfero / noosfero


Commits:
e7b1af14 by Marcos Ronaldo at 2016-05-03T16:04:44-03:00
Sets some blog_helper strings as html_safe

- - - - -
391ea2a1 by Bráulio Bhavamitra at 2016-05-03T23:16:48+00:00
Merge branch 'fix_blog_helper_html_safe' into 'master'

Sets some blog_helper strings as html_safe

Prevents html code from scaping in some strings.

See merge request !890
- - - - -


1 changed file:

- app/helpers/blog_helper.rb


Changes:

=====================================
app/helpers/blog_helper.rb
=====================================
--- a/app/helpers/blog_helper.rb
+++ b/app/helpers/blog_helper.rb
@@ -42,11 +42,11 @@ module BlogHelper
       content << (content_tag 'div', id: "post-#{art.id}", class: css_add do
         content_tag 'div', class: position + '-inner blog-post-inner' do
           display_post(art, conf[:format])  +
-          '<br style="clear:both"/>'
+          '<br style="clear:both"/>'.html_safe
         end
       end).html_safe
     }
-    safe_join(content, "\n<hr class='sep-posts'/>\n") + (pagination or '').html_safe
+    safe_join(content, "\n<hr class='sep-posts'/>\n".html_safe) + (pagination or '').html_safe
   end
 
   def display_post(article, format = 'full')



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/9cc7056d270fdc5bf5adf9323d6e125a83c4c997...391ea2a1dee9eba15db6d957bbdb6fecf9d24bf8
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160503/db02840b/attachment-0001.html>


More information about the Noosfero-dev mailing list