Testing if I can squash this way (#1)

* Fixed XSS resulting from markdown() method
This commit is contained in:
Chris Niedzwiedz 2017-01-09 12:27:11 -06:00 committed by GitHub
parent c552d08b8e
commit d2e177cac4
7 changed files with 61 additions and 1 deletions

View file

@ -260,7 +260,7 @@ module ApplicationHelper
space_after_headers: true,
no_intra_emphasis: true
}
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, options)
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML.new(escape_html: true), options)
markdown.render(text).html_safe
end