Using same markdown config as other instances (#15341)
Prior to this commit, this instantiation of `Redcarpet::Markdown` was different from the other instantiations. The other ones all included the second paramenter (e.g., `Constants::Redcarpet::CONFIG`). My question is, should we (or can we) be using the same configuration in all cases?
This commit is contained in:
parent
f6dc6c1112
commit
e35f4880d9
1 changed files with 1 additions and 1 deletions
|
|
@ -41,7 +41,7 @@ class DisplayAd < ApplicationRecord
|
|||
|
||||
def process_markdown
|
||||
renderer = Redcarpet::Render::HTMLRouge.new(hard_wrap: true, filter_html: false)
|
||||
markdown = Redcarpet::Markdown.new(renderer)
|
||||
markdown = Redcarpet::Markdown.new(renderer, Constants::Redcarpet::CONFIG)
|
||||
initial_html = markdown.render(body_markdown)
|
||||
stripped_html = ActionController::Base.helpers.sanitize initial_html,
|
||||
tags: ALLOWED_TAGS,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue