5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-14 22:41:41 +00:00

eliminar retornos de carro

This commit is contained in:
f 2020-08-15 11:58:28 -03:00
parent 452fc34b0e
commit 3a7ab15d2b
2 changed files with 2 additions and 2 deletions

View file

@ -12,6 +12,6 @@ class MetadataMarkdownContent < MetadataContent
# markdown y se eliminan autolinks. Mejor es deshabilitar la
# generación SAFE de CommonMark en la configuración del sitio.
def sanitize(string)
string
string.tr("\r", '')
end
end

View file

@ -99,7 +99,7 @@ MetadataTemplate = Struct.new(:site, :document, :name, :label, :type,
return if string.nil?
return string unless string.is_a? String
sanitizer.sanitize(string,
sanitizer.sanitize(string.tr("\r", ''),
tags: allowed_tags,
attributes: allowed_attributes + %w[data-trix-attachment],
scrubber: scrubber).strip.html_safe