Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape special characters in keys when using as anchor #86

Open
kellertuer opened this issue Jan 11, 2025 · 1 comment
Open

Escape special characters in keys when using as anchor #86

kellertuer opened this issue Jan 11, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@kellertuer
Copy link
Contributor

Hi,
we are using DocumenterCitations a lot and it is super great.

I had a problem with the links to the literature that I could never narrow down. Today I noticed what the problem is: When having special characters in the key of an entry, in our case espeially a :, the direct links to the references get rendered as

https://juliamanifolds.github.io/Manifolds.jl/stable/misc/references/#Chirikjian:2012

Which does not work, since :is not a valid part of a URL.

For reference the BibTeX entry is
https://github.com/JuliaManifolds/Manifolds.jl/blob/0c2a7b7a435c552379b3393dccce3de6fa514bfe/docs/src/references.bib#L270-L279

Currently it also seems maybe the anchor (id) gets even shortened?

Would it maybe be possible both for URLs and anchors to use URL escape codes https://docs.microfocus.com/OMi/10.62/Content/OMi/ExtGuide/ExtApps/URL_encoding.htm so that the URL above would read

https://juliamanifolds.github.io/Manifolds.jl/stable/misc/references/#Chirikjian%3A2012

and the id as well (this link currently does not work because the id for this example is cut off at the :)?
It is hopefully (just) using https://juliaweb.github.io/HTTP.jl/stable/reference/#URIs.escapeuri
That would be great!

Otherwise maybe document that those characters should not be in keys – though then we would have to rework all our keys (but well...).

@goerz
Copy link
Member

goerz commented Jan 11, 2025

I don’t see any reason to prohibit colons in citation keys, so yes, I consider this a bug. I’ll have a look when I have a chance

@goerz goerz added the bug Something isn't working label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants