no romper markdown!

This commit is contained in:
f 2020-06-09 11:28:18 -03:00
parent ebbca76f5b
commit 74845734cf

View file

@ -1,9 +1,17 @@
# frozen_string_literal: true
# Contenido con el editor de Markdown
class MetadataMarkdownContent < MetadataContent
# Renderizar a HTML
def to_s
CommonMarker.render_doc(value, %i[FOOTNOTES SMART],
%i[table strikethrough autolink]).to_html
end
# XXX: No sanitizamos acá porque se escapan varios símbolos de
# markdown y se eliminan autolinks. Mejor es habilitar la generación
# SAFE de CommonMark en la configuración del sitio.
def sanitize(string)
string
end
end