summaryrefslogtreecommitdiff
path: root/lib/api/project_snippets.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-06 16:10:24 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-06-06 16:10:24 +0300
commit883f465abe9df65a5186b358d0404f059b1f7a0d (patch)
treeaea02f387da8c2a6652ad423c2b385d17418913d /lib/api/project_snippets.rb
parentbeb0adf20287d4cc60c9415a5168ebfc8c631f68 (diff)
downloadgitlab-ce-883f465abe9df65a5186b358d0404f059b1f7a0d.tar.gz
Fix snippet raw content being escaped
Diffstat (limited to 'lib/api/project_snippets.rb')
-rw-r--r--lib/api/project_snippets.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/project_snippets.rb b/lib/api/project_snippets.rb
index 46f70f2dc6b..bee6544ea3d 100644
--- a/lib/api/project_snippets.rb
+++ b/lib/api/project_snippets.rb
@@ -113,6 +113,8 @@ module API
# GET /projects/:id/snippets/:snippet_id/raw
get ":id/snippets/:snippet_id/raw" do
@snippet = user_project.snippets.find(params[:snippet_id])
+
+ env['api.format'] = :txt
content_type 'text/plain'
present @snippet.content
end