Skip to content

Escape special characters in keys when using as anchor #86

@kellertuer

Description

@kellertuer

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...).

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions