Commit 883f465abe9df65a5186b358d0404f059b1f7a0d
1 parent
beb0adf2
Exists in
master
and in
4 other branches
Fix snippet raw content being escaped
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
lib/api/project_snippets.rb
@@ -113,6 +113,8 @@ module API | @@ -113,6 +113,8 @@ module API | ||
113 | # GET /projects/:id/snippets/:snippet_id/raw | 113 | # GET /projects/:id/snippets/:snippet_id/raw |
114 | get ":id/snippets/:snippet_id/raw" do | 114 | get ":id/snippets/:snippet_id/raw" do |
115 | @snippet = user_project.snippets.find(params[:snippet_id]) | 115 | @snippet = user_project.snippets.find(params[:snippet_id]) |
116 | + | ||
117 | + env['api.format'] = :txt | ||
116 | content_type 'text/plain' | 118 | content_type 'text/plain' |
117 | present @snippet.content | 119 | present @snippet.content |
118 | end | 120 | end |