From 4d61fe264567a36ecb5bae8b996c83fae482b3db Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Sun, 7 Jul 2019 11:46:05 +0200 Subject: [PATCH] handle unsafe characters in dois --- app/jobs/crossref_doi_by_id_job.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/jobs/crossref_doi_by_id_job.rb b/app/jobs/crossref_doi_by_id_job.rb index 038bc5896..45f99311b 100644 --- a/app/jobs/crossref_doi_by_id_job.rb +++ b/app/jobs/crossref_doi_by_id_job.rb @@ -48,7 +48,7 @@ def perform(id, options={}) } } - url = "http://localhost/dois/#{doi}" + url = "http://localhost/dois/#{Addressable::URI.encode(doi)}" response = Maremma.put(url, accept: 'application/vnd.api+json', content_type: 'application/vnd.api+json', data: data.to_json,