DOI with escaped symbols

edited September 26, 2025
The style for the journal produces dois in the bibliography with % url escapes:

10.1130/0016-7606(1970)81%5B3513:IOPTFT%5D2.0.CO;2.

This looks ugly and does not work for doi lookups. Is that something which can be changed with the style editor ? (admitting that I did not try to dig into that yet).

Thanks.
  • What style?
  • I'm not seeing that. How exactly are you generating the bibliography? And you've checked how the DOI is entered in Zotero (FWIW, those old DOIs with colons, square brackets, and what have you have some odd properties that make them behave poorly with lots of DOI based systems, but I'm not seeing any issue with Zotero for this one)
  • edited September 26, 2025
    I am using the chrome plugin, and the doi lookup in the app, to add items to the library.

    In the app, the doi field looks correct, eg. does not use the escapes.
  • edited September 26, 2025
    To generate, I am using the google docs plugin, and the add/edit bibliography function.
  • Well, I cannot change the doi with its odd properties. So I am looking for a way to deal with those. Perhaps manually, eg. search/replace after generation.
  • Does the xml style definition have a directive to avoid processing a field as an url, eg. use the field value verbatim ?
  • https://docs.citationstyles.org/en/stable/specification.html does not seem to provide special formatting of urls. So perhaps Zotero internally provides the doi with escapes to the style ?
  • You just hadn't said that you were referring to the Google Docs plugin.

    I can reproduce with that. We'll investigate.
  • edited 12 days ago
    Let me revive this post to open a discussion on how Zotero should deal with older DOIs with odd characters such as '[]<>' and others which are somewhat in conflict with the use of DOIs as URLs.

    Please note that any changes following from this discussion would not affect newer DOIs.

    The typical method to deal with odd characters in URLs is to replace them with a hexadecimal number which begins with a percent '%' sign. This works well in web browsers but not necessarily for DOIs since they become much harder to find in searches. For example, the Zotero lookup function does not work with such percent encoded DOIs.

    It turns out that Zotero is using a non-default option in the underlying citeproc-js library to intentionally generate such percent encoded DOIs. This was introduced about 9 years ago in order to ensure that DOIs can be clicked on and opened as URLs. This has a benefit for online bibliographies but for regular use in bibliographies in publications it can lead to quite extensive manual fixing of generated content.

    In my view, Zotero should follow the default behaviour of the underlying citeproc-js library or make the automatic conversion of DOIs into percent encoded URLs at least optional. A DOI is a unique identifier first which should not be modified. It is very useful to have it linked to an online resource directly but that is a secondary function.

    It turns out that last year the DOI.org organisation requested and implemented a similar change to the default behaviour of citeproc-js which affects DOIs in the most minimal way possible. For example, '[]' charcters are not affected. This should make Zotero's use of the more heavy-handed non-default option of citeproc-js unnecessary.

    Please see https://github.com/zotero/zotero/issues/5557 for more background and examples.
  • Zotero now uses default citeproc-js behavior in word processor integrations which is the typical mode. This will be helpful. The standalone app continues to function unchanged, eg. uses the percent encoding option.
  • dstillman Zotero Team
    This change is in Zotero 8.0.1.
Sign In or Register to comment.