Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Duncalfe <lduncalfe@eml.cc>2019-10-03 07:01:57 +0300
committerLuke Duncalfe <lduncalfe@eml.cc>2019-10-23 01:42:37 +0300
commit49a78d419d2379b06fd917173717a9fe8174697a (patch)
tree80b79a5457193c82696c076437b5d36e881ff214 /lib/gitlab/other_markup.rb
parentd5e0416021aa6de53b89f9d415f368226d9326e5 (diff)
Pass all wiki markup formats through pipelines
Previously, when the wiki page format was anything other than `markdown` or `asciidoc` the formatted content would be returned though a Gitaly call. Gitaly in turn would delegate formatting to the gitlab-gollum-lib gem, which in turn would delegate that to various gems (like RDoc for `rdoc`) and then apply some very liberal sanitization. It was too liberal! This change brings our wiki content formatting in line with how we format other markdown at GitLab, so we have a SSOT for sanitization. https://gitlab.com/gitlab-org/gitlab/issues/30540
Diffstat (limited to 'lib/gitlab/other_markup.rb')
-rw-r--r--lib/gitlab/other_markup.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/other_markup.rb b/lib/gitlab/other_markup.rb
index bc467486eee..0dd6b8a809c 100644
--- a/lib/gitlab/other_markup.rb
+++ b/lib/gitlab/other_markup.rb
@@ -10,7 +10,7 @@ module Gitlab
def self.render(file_name, input, context)
html = GitHub::Markup.render(file_name, input)
.force_encoding(input.encoding)
- context[:pipeline] = :markup
+ context[:pipeline] ||= :markup
html = Banzai.render(html, context)