mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Declare prior to use
This commit is contained in:
parent
304e91765d
commit
3b6b70f0bc
1 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,8 @@
|
|||
module ActionText
|
||||
SANITIZER = Rails::Html::Sanitizer.white_list_sanitizer
|
||||
ALLOWED_TAGS = SANITIZER.allowed_tags + [ ActionText::Attachment::TAG_NAME, "figure", "figcaption" ]
|
||||
ALLOWED_ATTRIBUTES = SANITIZER.allowed_attributes + ActionText::Attachment::ATTRIBUTES
|
||||
|
||||
module ContentHelper
|
||||
def render_action_text_content(content)
|
||||
content = content.render_attachments do |attachment|
|
||||
|
@ -21,8 +25,4 @@ module ActionText
|
|||
sanitize content.to_html, tags: ActionText::ALLOWED_TAGS, attributes: ActionText::ALLOWED_ATTRIBUTES
|
||||
end
|
||||
end
|
||||
|
||||
SANITIZER = Rails::Html::Sanitizer.white_list_sanitizer
|
||||
ALLOWED_TAGS = SANITIZER.allowed_tags + [ ActionText::Attachment::TAG_NAME, "figure", "figcaption" ]
|
||||
ALLOWED_ATTRIBUTES = SANITIZER.allowed_attributes + ActionText::Attachment::ATTRIBUTES
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue