poder usar markdown en las etiquetas de las plantillas

This commit is contained in:
f 2019-02-16 14:30:54 -03:00
parent f5635aa2c8
commit f1fa18bfa5
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7
2 changed files with 5 additions and 1 deletions

View file

@ -18,4 +18,8 @@ module ApplicationHelper
"#{f.first}[#{f.last}]"
end
def sanitize_markdown(text, options = {})
sanitize(CommonMarker.render_html(text), options)
end
end

View file

@ -126,7 +126,7 @@
= fa_icon 'link', title: t('posts.anchor')
- if template.private?
= fa_icon 'lock', title: t('posts.private')
= template.label
= sanitize_markdown template.label, tags: %w[a]
- if template.help
%small.text-muted.form-text= template.help
= render "posts/template_field/#{type}", template: template, name: template.key, value: value