5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-17 05:36:22 +00:00
panel/app/models/metadata_string.rb
2020-11-16 13:17:23 -03:00

20 lines
386 B
Ruby

# frozen_string_literal: true
# Un campo de texto
class MetadataString < MetadataTemplate
# Una string vacía
def default_value
''
end
private
# No se permite HTML en las strings
def sanitize(string)
return '' if string.blank?
sanitizer.sanitize(string.strip,
tags: [],
attributes: []).strip.html_safe
end
end