sckott / serrano

Low level Ruby client for Crossref
https://rubydoc.info/gems/serrano
MIT License
31 stars 3 forks source link

Fails to handle DOIs with unusual characters #51

Closed smackesey closed 6 years ago

smackesey commented 6 years ago

This fails:

Serrano.works(ids: '10.1002/1096-9861(20010212)430:3<283::aid-cne1031>3.0.co;2-v')

But this works:

encoded_doi = ERB::Util.url_encode('10.1002/1096-9861(20010212)430:3<283::aid-cne1031>3.0.co;2-v')
Serrano.works(ids: encoded_doi)

Serrano should probably perform this URL encoding for the user.

sckott commented 6 years ago

Thanks for this @smackesey

I agree we should probably do the url encoding

sckott commented 6 years ago

@smackesey can you reinstall from github and try again ?

smackesey commented 6 years ago

I tried with the latest commit from master and it now works. Thanks!