Commit d05d2562e85daa66f1dc3be52972e89f61545a9b
Exists in
staging
and in
30 other branches
Merge branch 'fix_comment_paragraph_parse' into 'master'
CommentParagraph: add data-macro-paragraph_uuid in sanitized allowed attributes After save TinyMceArticle article a worng parse was removing data-macro-paragraph_uuid from body data See merge request !912
Showing
2 changed files
with
4 additions
and
3 deletions
Show diff stats
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 < 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 | ... | ... |