Add aside and abbr tags to markdown whitelist (#818)

This commit is contained in:
Benny Powers 2018-10-04 19:34:29 +03:00 committed by Ben Halpern
parent a761dfbc83
commit 5f40607249

View file

@ -14,7 +14,7 @@ class MarkdownParser
return if @content.blank?
renderer = Redcarpet::Render::HTMLRouge.new(hard_wrap: true, filter_html: false)
markdown = Redcarpet::Markdown.new(renderer, REDCARPET_CONFIG)
tag_whitelist = %w(strong em p h1 h2 h3 h4 h5 h6 i u b code pre
tag_whitelist = %w(strong abbr aside em p h1 h2 h3 h4 h5 h6 i u b code pre
br ul ol li small sup sub img a span hr blockquote)
attribute_whitelist = %w(href strong em ref rel src title alt class)
ActionController::Base.helpers.sanitize markdown.render(@content).html_safe,