{"action":"created","issue":{"url":"https://api.github.com/repos/exercism/exercism.io/issues/3008","repository_url":"https://api.github.com/repos/exercism/exercism.io","labels_url":"https://api.github.com/repos/exercism/exercism.io/issues/3008/labels{/name}","comments_url":"https://api.github.com/repos/exercism/exercism.io/issues/3008/comments","events_url":"https://api.github.com/repos/exercism/exercism.io/issues/3008/events","html_url":"https://github.com/exercism/exercism.io/issues/3008","id":168184285,"number":3008,"title":"Normalizing line endings","user":{"login":"Insti","id":5096681,"avatar_url":"https://avatars.githubusercontent.com/u/5096681?v=3","gravatar_id":"","url":"https://api.github.com/users/Insti","html_url":"https://github.com/Insti","followers_url":"https://api.github.com/users/Insti/followers","following_url":"https://api.github.com/users/Insti/following{/other_user}","gists_url":"https://api.github.com/users/Insti/gists{/gist_id}","starred_url":"https://api.github.com/users/Insti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Insti/subscriptions","organizations_url":"https://api.github.com/users/Insti/orgs","repos_url":"https://api.github.com/users/Insti/repos","events_url":"https://api.github.com/users/Insti/events{/privacy}","received_events_url":"https://api.github.com/users/Insti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-28T20:06:30Z","updated_at":"2016-11-10T10:02:28Z","closed_at":null,"body":"While resolving #2915 I discovered that ajax requests and browser requests were submitting content with differing line endings.\n\nThe content submitted via a javascript call has \"\\n\" (`%0A`) line endings\nThe content submitted via a browser using \"application/x-www-form-urlencoded\" and has \"\\r\\n\" line endings  (`%0D%0A`)\n\nThis content is going into the database without any normalization of the line endings.\n\nMy questions were:\n\na) Is it worthwhile normalizing line endings?\nb) Should it be done as a big-bang process where we try to get them all at once?\nc) Should we just normalize the input to various routes as we find it necessary?\nor\nd) Should we just accept that there will be different line endings and make the code that needs to care about line endings take care of itself?\ne) Something else?\n\n[kytrinyx replied](https://github.com/exercism/exercism.io/issues/2915#issuecomment-225336446):\n\n> [...] we should probably normalize line-endings on the way in.\n> \n> [...] if we take care of code submissions [and] comments then any further problems could be dealt with when they come up.\n\nOther issues: \n\nAre there any other consequences we need to be aware of?\nWhat about existing database content with \"\\r\\n\" line endings?\n\n**What needs to be done:**\n\nLine endings should be normalised from \"\\r\\n\" to \"\\n\" as the content comes in for submissions and comments and before it is used by the app for further processing or storage in the database.\n"},"comment":{"url":"https://api.github.com/repos/exercism/exercism.io/issues/comments/259649403","html_url":"https://github.com/exercism/exercism.io/issues/3008#issuecomment-259649403","issue_url":"https://api.github.com/repos/exercism/exercism.io/issues/3008","id":259649403,"user":{"login":"ErikSchierboom","id":135246,"avatar_url":"https://avatars.githubusercontent.com/u/135246?v=3","gravatar_id":"","url":"https://api.github.com/users/ErikSchierboom","html_url":"https://github.com/ErikSchierboom","followers_url":"https://api.github.com/users/ErikSchierboom/followers","following_url":"https://api.github.com/users/ErikSchierboom/following{/other_user}","gists_url":"https://api.github.com/users/ErikSchierboom/gists{/gist_id}","starred_url":"https://api.github.com/users/ErikSchierboom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ErikSchierboom/subscriptions","organizations_url":"https://api.github.com/users/ErikSchierboom/orgs","repos_url":"https://api.github.com/users/ErikSchierboom/repos","events_url":"https://api.github.com/users/ErikSchierboom/events{/privacy}","received_events_url":"https://api.github.com/users/ErikSchierboom/received_events","type":"User","site_admin":false},"created_at":"2016-11-10T10:02:28Z","updated_at":"2016-11-10T10:02:28Z","body":"This would be a great feature. It would prevent exercises that are essentially the same, except for the whitespace from being duplicated when submitted, right?"}}
{"actor":{"display_login":"ErikSchierboom"}}