[BUG | API] Unescaped Snippet Blob
Created by: valeriomazzeo
When retrieving the raw content of a snippet no encoding is applied. Basically the content returned from the API is different than the one returned from the website when pressing the "raw" button.
This is how it should be (raw button from the website): http://demo.gitlab.com/diaspora/diaspora/snippets/41/raw
if this_rocks:
return DonateACaseOfBeerTo("gitlab")
else:
return StillDonateACaseOfBeerTo("gitlab")
# How to be a man when contraception fails!
try:
Contraception()
except contraception.Failed:
raise Kids()
This is what the api returns: http://demo.gitlab.com/api/v3/projects/1/snippets/41/raw?private_token=xD2u7qqskGczXKZ7Mum9
"if this_rocks:\r\n return DonateACaseOfBeerTo(\"gitlab\")\r\nelse:\r\n return StillDonateACaseOfBeerTo(\"gitlab\")\r\n\r\n\r\n\r\n# How to be a man when contraception fails!\r\ntry:\r\n Contraception()\r\nexcept contraception.Failed:\r\n raise Kids()"