diff options
author | Robert Speicher <robert@gitlab.com> | 2017-05-02 17:52:19 +0300 |
---|---|---|
committer | Bob Van Landuyt <bob@gitlab.com> | 2017-05-10 17:44:20 +0300 |
commit | 99996b6bc7c13e7e7f871919942907b380d4b58c (patch) | |
tree | c87b232ade284781ae96d2819636c639d584972b /lib/gitlab/other_markup.rb | |
parent | 9b03ed0a182c9ad96957085826cc85f8f229569c (diff) |
Merge branch 'bvl-security-9-1-markup-pipeline'
(security-9-1) Render asciidoc & other markup using banzai in a pipeline
See merge request !2098
Diffstat (limited to 'lib/gitlab/other_markup.rb')
-rw-r--r-- | lib/gitlab/other_markup.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/other_markup.rb b/lib/gitlab/other_markup.rb index c2adc9aa10b..31a24460f0f 100644 --- a/lib/gitlab/other_markup.rb +++ b/lib/gitlab/other_markup.rb @@ -5,12 +5,12 @@ module Gitlab # # input - the source text in a markup format # - def self.render(file_name, input) + def self.render(file_name, input, context) html = GitHub::Markup.render(file_name, input). force_encoding(input.encoding) + context[:pipeline] = :markup - filter = Banzai::Filter::SanitizationFilter.new(html) - html = filter.call.to_s + html = Banzai.render(html, context) html.html_safe end |