sutty/app/models/metadata_string.rb

22 lines
429 B
Ruby
Raw Normal View History

2019-08-06 17:54:17 +00:00
# frozen_string_literal: true
# Un campo de texto
class MetadataString < MetadataTemplate
# Una string vacía
def default_value
''
end
2020-07-02 14:26:00 +00:00
private
# No se permite HTML en las strings
def sanitize(string)
return '' if string.blank?
sanitizer.sanitize(string.strip,
tags: [],
attributes: [],
scrubber: scrubber).strip.html_safe
end
2019-08-06 17:54:17 +00:00
end