mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #1243 from cniedzwiedz/squash_test
Fixed XSS in markdown() method
This commit is contained in:
commit
ff65b3b601
7 changed files with 61 additions and 1 deletions
|
|
@ -295,7 +295,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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue