mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 17:36:23 +00:00
eliminar retornos de carro
This commit is contained in:
parent
452fc34b0e
commit
3a7ab15d2b
2 changed files with 2 additions and 2 deletions
|
@ -12,6 +12,6 @@ class MetadataMarkdownContent < MetadataContent
|
||||||
# markdown y se eliminan autolinks. Mejor es deshabilitar la
|
# markdown y se eliminan autolinks. Mejor es deshabilitar la
|
||||||
# generación SAFE de CommonMark en la configuración del sitio.
|
# generación SAFE de CommonMark en la configuración del sitio.
|
||||||
def sanitize(string)
|
def sanitize(string)
|
||||||
string
|
string.tr("\r", '')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -99,7 +99,7 @@ MetadataTemplate = Struct.new(:site, :document, :name, :label, :type,
|
||||||
return if string.nil?
|
return if string.nil?
|
||||||
return string unless string.is_a? String
|
return string unless string.is_a? String
|
||||||
|
|
||||||
sanitizer.sanitize(string,
|
sanitizer.sanitize(string.tr("\r", ''),
|
||||||
tags: allowed_tags,
|
tags: allowed_tags,
|
||||||
attributes: allowed_attributes + %w[data-trix-attachment],
|
attributes: allowed_attributes + %w[data-trix-attachment],
|
||||||
scrubber: scrubber).strip.html_safe
|
scrubber: scrubber).strip.html_safe
|
||||||
|
|
Loading…
Reference in a new issue