This commit is contained in:
f 2020-11-16 13:09:04 -03:00
parent 3c8dc2d2cc
commit 8d5e1e860d

View file

@ -123,18 +123,18 @@ MetadataTemplate = Struct.new(:site, :document, :name, :label, :type,
tags: allowed_tags, tags: allowed_tags,
attributes: allowed_attributes, attributes: allowed_attributes,
scrubber: scrubber).strip.html_safe scrubber: scrubber).strip.html_safe
en, end
def sanitizer def sanitizer
@sanitizer ||= Rails::Html::Sanitizer.safe_list_sanitizer.new @sanitizer ||= Rails::Html::Sanitizer.safe_list_sanitizer.new
end end
def allowed_attributes def allowed_attributes
@allowed_attributes ||= %w[style src alt controls data-align] @allowed_attributes ||= %w[style src alt controls data-align].freeze
end end
def allowed_tags def allowed_tags
@allowed_tags ||= %w[strong em del u mark p h1 h2 h3 h4 h5 h6 ul ol li img iframe audio video div] @allowed_tags ||= %w[strong em del u mark p h1 h2 h3 h4 h5 h6 ul ol li img iframe audio video div].freeze
end end
# Decifra el valor # Decifra el valor