From eb8d2df06a7cc2ccff3132643e84588b80546076 Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Sun, 12 Jul 2015 22:12:46 -0300 Subject: [PATCH] rails4: use new sanitizer --- plugins/comment_group/lib/comment_group_plugin/macros/allow_comment.rb | 5 +++-- plugins/variables/lib/variables_plugin/macros/profile.rb | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/comment_group/lib/comment_group_plugin/macros/allow_comment.rb b/plugins/comment_group/lib/comment_group_plugin/macros/allow_comment.rb index c4258f9..6d8dee0 100644 --- a/plugins/comment_group/lib/comment_group_plugin/macros/allow_comment.rb +++ b/plugins/comment_group/lib/comment_group_plugin/macros/allow_comment.rb @@ -1,7 +1,8 @@ -#FIXME See a better way to generalize this parameter. -ActionView::Base.sanitized_allowed_attributes += ['data-macro', 'data-macro-group_id'] +# FIXME See a better way to generalize this parameter. +Loofah::HTML5::WhiteList::ALLOWED_ATTRIBUTES.merge %w[data-macro data-macro-group_id] class CommentGroupPlugin::AllowComment < Noosfero::Plugin::Macro + def self.configuration { :params => [], :skip_dialog => true, diff --git a/plugins/variables/lib/variables_plugin/macros/profile.rb b/plugins/variables/lib/variables_plugin/macros/profile.rb index 02f60d0..a37c8ee 100644 --- a/plugins/variables/lib/variables_plugin/macros/profile.rb +++ b/plugins/variables/lib/variables_plugin/macros/profile.rb @@ -1,4 +1,5 @@ -ActionView::Base.sanitized_allowed_attributes += ['data-macro'] +# FIXME See a better way to generalize this parameter. +Loofah::HTML5::WhiteList::ALLOWED_ATTRIBUTES.merge %w[data-macro] class VariablesPlugin::Profile < Noosfero::Plugin::Macro -- libgit2 0.21.2