diff --git a/plugins/comment_paragraph/lib/comment_paragraph_plugin/macros/allow_comment.rb b/plugins/comment_paragraph/lib/comment_paragraph_plugin/macros/allow_comment.rb index 8713402..1414591 100644 --- a/plugins/comment_paragraph/lib/comment_paragraph_plugin/macros/allow_comment.rb +++ b/plugins/comment_paragraph/lib/comment_paragraph_plugin/macros/allow_comment.rb @@ -1,5 +1,6 @@ -# FIXME See a better way to generalize this parameter. -Loofah::HTML5::WhiteList::ALLOWED_ATTRIBUTES.merge %w[data-macro data-macro-group_id] +class Application < Rails::Application + config.action_view.sanitized_allowed_attributes << 'data-macro-paragraph_uuid' +end class CommentParagraphPlugin::AllowComment < Noosfero::Plugin::Macro diff --git a/plugins/comment_paragraph/test/unit/article_test.rb b/plugins/comment_paragraph/test/unit/article_test.rb index ae4359d..045b7ba 100644 --- a/plugins/comment_paragraph/test/unit/article_test.rb +++ b/plugins/comment_paragraph/test/unit/article_test.rb @@ -5,7 +5,7 @@ class ArticleTest < ActiveSupport::TestCase def setup @profile = fast_create(Community) - @article = fast_create(TextArticle, :profile_id => profile.id) + @article = fast_create(TinyMceArticle, :profile_id => profile.id) @environment = Environment.default @environment.enable_plugin(CommentParagraphPlugin) end -- libgit2 0.21.2