Carriage Returns in Newlines when Adding Project Variables
When adding a project variable via the web UI (i.e. https://gitlab.com/user/project/variables ),
any newlines entered get converted to Windows style newlines, \r\n
. This causes errors in
a variety of situations.
This can be confirmed by using the API:
curl https://gitlab.com/api/v3/projects/123/variables/MY_VARIABLE_WITH_NEWLINES
and worked around the same way
curl -XPUT https://gitlab.com/api/v3/projects/123/variables/MY_VARIABLE_WITH_NEWLINES --form value=$'Fix my\nnewlines'
As far as I know, this issue was not present in GitLab CE v8.11.x, but is present in 8.12.3 and 8.13.1.