Re: [protege-user] DOI character bug?
Damien Goutte-Gattat via protege-user <[email protected]>
| Newsgroups | gmane.comp.misc.ontology.protege.owl |
|---|---|
| Message-ID | <[email protected]> |
On 9 May 2025, at 09:13, Ditch Townsend <[email protected]> wrote: > I have had a single DOI reference in Protege which does not trigger an embedded html link, and I wonder if it is because one of the characters it uses breaks Protege's ability to recognise it as a link? It is fully resolvable using my Firefox web browser so it is not a mistake in the DOI itself. Well, I’d say it’s debatable that it is “not a mistake in the DOI itself”. Square brackets are _not_ allowed in a URI (as per RFC 2396). It works in a web browser because web browsers typically expect a URI to be potentially ill-formed and will attempt to automatically escape forbidden characters, but try for example with cURL on the command line: $ curl ‘https://doi.org/10.1674/0003-0031(2000)144[0187:SBITBC]2.0.CO;2' <https://doi.org/10.1674/0003-0031(2000)144%5B0187:SBITBC%5D2.0.CO;2'> curl: (3) bad range in URL position 44: https://doi.org/10.1674/0003-0031(2000)144[0187:SBITBC]2.0.CO;2 ^ Now, square brackets _are_ allowed in the suffix part of a DOI (basically _everything_ is allowed there), so technically whoever emitted that DOI did not, technically, made a “mistake”. Instead, they just did something completely stupid that is bound to break a lot of DOI-handling code that assumes that it is fine to just append the DOI to a resolver service like ‘https://doi.org/' and get a valid URI. This is exactly what happens here in Protégé. - Damien -- Damien Goutte-Gattat, PhD Department of Physiology, Development and Neuroscience [email protected] Downing Street +44 7954 894097 Cambridge CB2 3DY _______________________________________________ protege-user mailing list [email protected] https://mailman.stanford.edu/mailman/listinfo/protege-user