{"action":"closed","issue":{"url":"https://api.github.com/repos/IQSS/dataverse/issues/1585","repository_url":"https://api.github.com/repos/IQSS/dataverse","labels_url":"https://api.github.com/repos/IQSS/dataverse/issues/1585/labels{/name}","comments_url":"https://api.github.com/repos/IQSS/dataverse/issues/1585/comments","events_url":"https://api.github.com/repos/IQSS/dataverse/issues/1585/events","html_url":"https://github.com/IQSS/dataverse/issues/1585","id":59878707,"number":1585,"title":"multi-line SWORD collectionPolicy (API Terms of Use) squished into a single line","user":{"login":"pdurbin","id":21006,"avatar_url":"https://avatars.githubusercontent.com/u/21006?v=3","gravatar_id":"","url":"https://api.github.com/users/pdurbin","html_url":"https://github.com/pdurbin","followers_url":"https://api.github.com/users/pdurbin/followers","following_url":"https://api.github.com/users/pdurbin/following{/other_user}","gists_url":"https://api.github.com/users/pdurbin/gists{/gist_id}","starred_url":"https://api.github.com/users/pdurbin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdurbin/subscriptions","organizations_url":"https://api.github.com/users/pdurbin/orgs","repos_url":"https://api.github.com/users/pdurbin/repos","events_url":"https://api.github.com/users/pdurbin/events{/privacy}","received_events_url":"https://api.github.com/users/pdurbin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/IQSS/dataverse/labels/Component:%20API","name":"Component: API","color":"c7def8"},{"url":"https://api.github.com/repos/IQSS/dataverse/labels/Priority%201:%20Low","name":"Priority 1: Low","color":"f9d0c4"},{"url":"https://api.github.com/repos/IQSS/dataverse/labels/Status:%20Triaged","name":"Status: Triaged","color":"66cc66"},{"url":"https://api.github.com/repos/IQSS/dataverse/labels/Type:%20Bug","name":"Type: Bug","color":"fef2c0"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-04T23:16:19Z","updated_at":"2016-03-31T16:59:13Z","closed_at":"2016-03-31T16:59:13Z","body":"First reported at https://github.com/IQSS/dataverse/issues/551#issuecomment-77267924\r\n\r\nI'm getting strange results from a multi-line input file. It gets squished onto a single line like this:\r\n\r\n`<collectionPolicy xmlns=\"http://purl.org/net/sword/terms/\">This is line 1 of API terms.This is line 2 of API terms.This is line 3 of API terms.</collectionPolicy>`\r\n\r\nI'm not sure how to fix this. Here's the multi-line file and how I put it in the database and checked the SWORD service document:\r\n\r\n    $ cat /tmp/api-tos.txt \r\n    This is line 1 of API terms.\r\n    This is line 2 of API terms.\r\n    This is line 3 of API terms.\r\n    $ curl -X PUT -d@/tmp/api-tos.txt http://localhost:8080/api/s/settings/:ApiTermsOfUse\r\n    {\"status\":\"OK\",\"data\":{\":ApiTermsOfUse\":\"This is line 1 of API terms.This is line 2 of API terms.This is line 3 of API terms.\"}}\r\n    $ scripts/api/data-deposit/service-document | grep collectionPolicy | head -1"}}