Open prowlett opened 3 years ago
This code in LaTeX:
\documentclass{article} \usepackage{hyperref} \begin{document} \href{/static/files/a--file.pdf}{View file}. \end{document}
creates a link like
<a href="../../static/files/a–file.pdf">View file</a>.
i.e. the -- in the filename is interpreted as –, leading to a 404 error.
--
–
Note that this equivalent code in Markdown:
[View file](/static/files/a--file.pdf).
works fine, creating a link like
<a href="../../static/files/a--file.pdf">View file</a>.
Of course, I've changed the filename to only have one - as a workaround.
-
I've just realised this is a URL thing, rather than a static files thing. For example, this code
\documentclass{article} \usepackage{hyperref} \begin{document} \href{https://duckduckgo.com/?q=--}{Search --}. \end{document}
<a href="https://duckduckgo.com/?q=–">Search –</a>.
I think this is a bug in plasTeX - it's applying its character normalizations, but it shouldn't. I've opened an issue in the plasTeX repo: plastex/plastex#342
This code in LaTeX:
creates a link like
i.e. the
--
in the filename is interpreted as–
, leading to a 404 error.Note that this equivalent code in Markdown:
works fine, creating a link like
Of course, I've changed the filename to only have one
-
as a workaround.I've just realised this is a URL thing, rather than a static files thing. For example, this code
creates a link like