Commit f85258d09f6293ee4257e339fc3517a5e705bf44

Authored by Leandro Santos
1 parent 141c0c41

CommentParagraph: add data-macro-paragraph_uuid in sanitized allowed attributes

plugins/comment_paragraph/lib/comment_paragraph_plugin/macros/allow_comment.rb
1   -# FIXME See a better way to generalize this parameter.
2   -Loofah::HTML5::WhiteList::ALLOWED_ATTRIBUTES.merge %w[data-macro data-macro-group_id]
  1 +class Application < Rails::Application
  2 + config.action_view.sanitized_allowed_attributes << 'data-macro-paragraph_uuid'
  3 +end
3 4  
4 5 class CommentParagraphPlugin::AllowComment < Noosfero::Plugin::Macro
5 6  
... ...
plugins/comment_paragraph/test/unit/article_test.rb
... ... @@ -5,7 +5,7 @@ class ArticleTest &lt; ActiveSupport::TestCase
5 5  
6 6 def setup
7 7 @profile = fast_create(Community)
8   - @article = fast_create(TextArticle, :profile_id => profile.id)
  8 + @article = fast_create(TinyMceArticle, :profile_id => profile.id)
9 9 @environment = Environment.default
10 10 @environment.enable_plugin(CommentParagraphPlugin)
11 11 end
... ...