5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 21:06:22 +00:00
panel/app/models/metadata_string.rb

20 lines
395 B
Ruby

# frozen_string_literal: true
# Un campo de texto
class MetadataString < MetadataTemplate
# Una string vacía
def default_value
super || ''
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