Encoded URLs and "dx" in parsing DOIs

Hi, I found two small issues in DOI validation in the "add item by identifier" section.

First one is that some DOI urls start with "dx.doi.org" instead of just "doi.org", zotero doesn't accept them even though they're valid DOI urls.

The second issue is that zotero doesn't accept urls that have encoded characters in them. For example, if I copy the DOI url from "https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7366851/", what would be pasted is "https://dx.doi.org/10.15585/mmwr.mm6928a2" which has "%2F" instead of "/". That's the only encoded character that I've seen so far in doi urls, so a simple search and replace might be enough.

Unfortunately, I don't know anything about JS to make these little changes, so I though I should tell the developers about them, so they can consider it in the next release.

Thank you!
  • That box accepts DOIs, not URLs. If you already have a URL, you can just paste it into your browser and save from the publisher page with the Zotero Connector, and then you may get a PDF as well.
    some DOI urls start with "dx.doi.org" instead of just "doi.org", zotero doesn't accept them even though they're valid DOI urls.
    Not sure why you think this. Zotero parses the DOI out of the URL. Whether it happens to be a doi.org or dx.doi.org URL doesn't make any difference, as long as a valid DOI appears in the URL.
  • To be clear, there's absolutely no reason to copy a DOI URL from this page. You would just click the Save to Zotero button. If for some reason you couldn't do that, you would copy the DOI itself, not the DOI URL.
  • The URL encoding issue isn't trivial. %2F is a legal (if unfortunate and hopefully rare) character sequence in a DOI. Moreover, Zotero _encodes_ the DOI when requesting the metadata, so all sorts of ways in which this can go wrong.

    The dx.doi prefix shouldn't be a problem, otoh.
  • If we really wanted to handle the encoded slashes, we could detect that the DOI was part of a URL and decode them — an actual "%2F" sequence in a DOI would be encoded further in a properly encoded URL. We just don't officially support URLs in this dialog, and there's no particular reason they should be pasted in.
  • Sorry, I just checked and the "dx" problem was a problem on my end! Nothing related to Zotero.
    I didn't know URLs were not officially supported. I'll use browser addon.
Sign In or Register to comment.