diff options
author | Luke Duncalfe <lduncalfe@eml.cc> | 2019-10-03 17:01:57 +1300 |
---|---|---|
committer | Luke Duncalfe <lduncalfe@eml.cc> | 2019-10-23 11:42:37 +1300 |
commit | 49a78d419d2379b06fd917173717a9fe8174697a (patch) | |
tree | 80b79a5457193c82696c076437b5d36e881ff214 /app/models/wiki_page.rb | |
parent | d5e0416021aa6de53b89f9d415f368226d9326e5 (diff) | |
download | gitlab-ce-49a78d419d2379b06fd917173717a9fe8174697a.tar.gz |
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 'app/models/wiki_page.rb')
-rw-r--r-- | app/models/wiki_page.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index 1fa29e5b933..68241d2bd95 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -134,6 +134,12 @@ class WikiPage @version ||= @page.version end + def path + return unless persisted? + + @path ||= @page.path + end + def versions(options = {}) return [] unless persisted? |