Closed TomBener closed 4 months ago
I tried with this document
---
title: "Presentation"
format:
html:
link-external-icon: true
link-external-newwindow: true
---
# Using HTML unmarked
Gruffudd P, 1995. Remaking Wales: Nation-Building and the Geographical Imagination, 1925–1950[J/OL]. Political Geography, 14(3): 219–239. DOI: <a href="https://doi.org/10.1016/0962-6298(95)93185-L">10.1016/0962-6298(95)93185-L</a>.
# Using HTML marked
Gruffudd P, 1995. Remaking Wales: Nation-Building and the Geographical Imagination, 1925–1950[J/OL]. Political Geography, 14(3): 219–239. DOI: `<a href="https://doi.org/10.1016/0962-6298(95)93185-L">10.1016/0962-6298(95)93185-L</a>`{=html}.
# Using Markdown
Gruffudd P, 1995. Remaking Wales: Nation-Building and the Geographical Imagination, 1925–1950[J/OL]. Political Geography, 14(3): 219–239. DOI: [10.1016/0962-6298(95)93185-L](https://doi.org/10.1016/0962-6298(95)93185-L)
And I published it to quartopub to check : https://cderv.quarto.pub/html-test/
All links are correctly formated and works.
So it seems either it is link to some github pages processing (how did you deploy it ?) or this is link to your specific content ?
Can you create a reproducible example as a github repository, and deploy your project to gh-pages in this repository ?
This way we can check live example, and clone it and investigate if needed.
Thank you !
Thanks for your testing!
I opened your deployed page and the link worked not correctly. I have tested on both Chrome and Safari.
I think this is the problem of my browsers.
Thanks again. I'll investigate further.
It works well on iOS Safari.
I cannot reproduce your issue:
Safari 17.5 | Brave 1.66.110 (Chromium: 125.0.6422.60) |
---|---|
It works also ok on Chrome for me, and also Edge, Firefox. So it seems something in your browser environment makes this not work.
You should try in private windows, with all extensions deactivated in case one of them is applying some processing on those links. EDIT: Which it seems you already did.
Can you check the source code from the page you have? (Right click + See source code or something like that) It should be correct, which would then lead to a processing somehow on your environment. Not sure what...
The source code of the page is also broken in Chrome 125.0.6422.113, as well as Safari 17.5. I also tested on Arc and Firefox, all the same. But I switched to another Mac, the links displayed as expected, that's really weird…
FINALLY, I figured out the cause! It is because I have installed a userscript to manipulate some link rules. Disabling it would fix the link issue above. I'll remove this userscript immediately. Thanks for your patient help @cderv @mcanouil
Bug description
I am experiencing an issue with how HTML links containing parentheses are rendered when using the
link-external-icon
andlink-external-newwindow
options in Quarto. The HTML snippet generated locally is correct, but when the page is deployed on GitHub Pages or other online servers, the link structure changes unexpectedly.Steps to reproduce
Expected behavior
The link should appear as follows:
Actual behavior
The link is rendered as follows:
Additional Information:
The issue seems to be caused by the presence of parentheses within the DOI link. Links without parentheses are rendered correctly. In comparison, generating the same html file via Pandoc directly doesn't have this issue. I suspect the problem lies in the specific libraries Quarto is using.
The bib file is as follows:
Your environment
Quarto check output
Details
``` Quarto 1.5.39 [✓] Checking versions of quarto binary dependencies... Pandoc version 3.2.0: OK Dart Sass version 1.70.0: OK Deno version 1.41.0: OK Typst version 0.11.0: OK [✓] Checking versions of quarto dependencies......OK [✓] Checking Quarto installation......OK Version: 1.5.39 Path: /Applications/quarto/bin [✓] Checking tools....................OK TinyTeX: v2024.05 Chromium: (not installed) [✓] Checking LaTeX....................OK Using: TinyTex Path: /Users/username/Library/TinyTeX/bin/universal-darwin Version: 2024 [✓] Checking basic markdown render....OK [✓] Checking Python 3 installation....OK Version: 3.10.10 Path: /Users/username/.pyenv/versions/3.10.10/bin/python3 Jupyter: 5.7.2 Kernels: python3 [✓] Checking Jupyter engine render....OK [✓] Checking R installation...........OK Version: 4.4.0 Path: /opt/homebrew/Cellar/r/4.4.0_1/lib/R LibPaths: - /Users/username/.R/packages - /opt/homebrew/lib/R/4.4/site-library - /opt/homebrew/Cellar/r/4.4.0_1/lib/R/library knitr: 1.46 rmarkdown: 2.26 [✓] Checking Knitr engine render......OK ```