[Git][noosfero/noosfero][master] html_safe: fix escaping in require_auth_to_comment and responsive plugins

Bráulio Bhavamitra gitlab at mg.gitlab.com
Wed Jun 8 17:13:34 BRT 2016


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


Commits:
3290adaf by Braulio Bhavamitra at 2016-06-08T17:12:28-03:00
html_safe: fix escaping in require_auth_to_comment and responsive plugins

- - - - -


2 changed files:

- plugins/require_auth_to_comment/lib/require_auth_to_comment_plugin.rb
- plugins/responsive/views/layouts/application-responsive.html.erb


Changes:

=====================================
plugins/require_auth_to_comment/lib/require_auth_to_comment_plugin.rb
=====================================
--- a/plugins/require_auth_to_comment/lib/require_auth_to_comment_plugin.rb
+++ b/plugins/require_auth_to_comment/lib/require_auth_to_comment_plugin.rb
@@ -38,7 +38,7 @@ class RequireAuthToCommentPlugin < Noosfero::Plugin
   end
 
   def body_beginning
-    "<meta name='profile.allow_unauthenticated_comments'/>" if allowed_by_profile
+    tag :meta, name: 'profile.allow_unauthenticated_comments' if allowed_by_profile
   end
 
   protected


=====================================
plugins/responsive/views/layouts/application-responsive.html.erb
=====================================
--- a/plugins/responsive/views/layouts/application-responsive.html.erb
+++ b/plugins/responsive/views/layouts/application-responsive.html.erb
@@ -36,7 +36,7 @@
     <%=
       @plugins.dispatch(:body_beginning).map do |content|
         if content.respond_to?(:call) then instance_exec(&content).to_s.html_safe else content.to_s.html_safe end
-      end.join("\n")
+      end.safe_join
     %>
     <div id="global-header">
       <%= global_header %>



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/3290adaf8bf27647971c14ef505196ca797b7d56
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20160608/c1aa0f7b/attachment-0001.html>


More information about the Noosfero-dev mailing list