summaryrefslogtreecommitdiff
path: root/lib/api/entities/wiki_page.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/entities/wiki_page.rb')
-rw-r--r--lib/api/entities/wiki_page.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/api/entities/wiki_page.rb b/lib/api/entities/wiki_page.rb
index 43af6a336d2..5bba4271396 100644
--- a/lib/api/entities/wiki_page.rb
+++ b/lib/api/entities/wiki_page.rb
@@ -6,7 +6,15 @@ module API
include ::MarkupHelper
expose :content do |wiki_page, options|
- options[:render_html] ? render_wiki_content(wiki_page, ref: wiki_page.version.id) : wiki_page.content
+ if options[:render_html]
+ render_wiki_content(
+ wiki_page,
+ ref: wiki_page.version.id,
+ current_user: options[:current_user]
+ )
+ else
+ wiki_page.content
+ end
end
expose :encoding do |wiki_page|