{"action":"created","issue":{"url":"https://api.github.com/repos/sul-dlss/argo/issues/395","labels_url":"https://api.github.com/repos/sul-dlss/argo/issues/395/labels{/name}","comments_url":"https://api.github.com/repos/sul-dlss/argo/issues/395/comments","events_url":"https://api.github.com/repos/sul-dlss/argo/issues/395/events","html_url":"https://github.com/sul-dlss/argo/pull/395","id":122849679,"number":395,"title":"set the XML to be verbatim as posted from the client after validation","user":{"login":"drh-stanford","id":1861171,"avatar_url":"https://avatars.githubusercontent.com/u/1861171?v=3","gravatar_id":"","url":"https://api.github.com/users/drh-stanford","html_url":"https://github.com/drh-stanford","followers_url":"https://api.github.com/users/drh-stanford/followers","following_url":"https://api.github.com/users/drh-stanford/following{/other_user}","gists_url":"https://api.github.com/users/drh-stanford/gists{/gist_id}","starred_url":"https://api.github.com/users/drh-stanford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drh-stanford/subscriptions","organizations_url":"https://api.github.com/users/drh-stanford/orgs","repos_url":"https://api.github.com/users/drh-stanford/repos","events_url":"https://api.github.com/users/drh-stanford/events{/privacy}","received_events_url":"https://api.github.com/users/drh-stanford/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sul-dlss/argo/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-18T00:05:49Z","updated_at":"2015-12-18T22:06:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sul-dlss/argo/pulls/395","html_url":"https://github.com/sul-dlss/argo/pull/395","diff_url":"https://github.com/sul-dlss/argo/pull/395.diff","patch_url":"https://github.com/sul-dlss/argo/pull/395.patch"},"body":"Tries to address #85 by setting the datastream in the XML editor to the exact content. Unfortunately ActiveFedora filters this content through `Nokogiri::XML.to_s` so the newline entities disappear. However, this is our part of the fix.\r\n\r\nThis PR also does major cleanup of the `datastream_update` method and specs to handle empty and malformed arguments."},"comment":{"url":"https://api.github.com/repos/sul-dlss/argo/issues/comments/165907911","html_url":"https://github.com/sul-dlss/argo/pull/395#issuecomment-165907911","issue_url":"https://api.github.com/repos/sul-dlss/argo/issues/395","id":165907911,"user":{"login":"drh-stanford","id":1861171,"avatar_url":"https://avatars.githubusercontent.com/u/1861171?v=3","gravatar_id":"","url":"https://api.github.com/users/drh-stanford","html_url":"https://github.com/drh-stanford","followers_url":"https://api.github.com/users/drh-stanford/followers","following_url":"https://api.github.com/users/drh-stanford/following{/other_user}","gists_url":"https://api.github.com/users/drh-stanford/gists{/gist_id}","starred_url":"https://api.github.com/users/drh-stanford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drh-stanford/subscriptions","organizations_url":"https://api.github.com/users/drh-stanford/orgs","repos_url":"https://api.github.com/users/drh-stanford/repos","events_url":"https://api.github.com/users/drh-stanford/events{/privacy}","received_events_url":"https://api.github.com/users/drh-stanford/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T22:06:08Z","updated_at":"2015-12-18T22:06:08Z","body":"I've updated the PR to handle both empty and malformed cases -- Nokogiri throws a RuntimeError if the document is empty so I check for that beforehand so I can rescue on SyntaxError only.\r\n\r\nThe specs were also incomplete and off a bit so i restructured them all"}}