Double escaped &
in HTML link query params with Sphinx and MyST
#1028
Labels
bug
Something isn't working
&
in HTML link query params with Sphinx and MyST
#1028
What version of
myst-parser
are you using?4.0.1
What version dependencies are you using?
The latest as of today.
What operating system are you using?
Mac
Describe the Bug
Creating a link such as the following:
Produces the following incorrect HTML.
Note how the
&
separating the parameters is double-escaped into&
.Expected Behavior
The same output should produce the following HTML.
To Reproduce
This is a possible duplicate of #760 which is labeled as
more-info-required
. A possible fix (unverified by me) is at #929.To reproduce the issue:
Create the following files in an empty directory.
pyproject.toml
:docs/conf.py
:docs/index.md
:Install dependencies via
uv
or any other package manager:uv venv . ./venv/bin/activate uv sync --upgrade --exclude-newer=2025-02-25T14:50:00+01:00
(The last parameter ensures you get the exact same packages as me right now. Omit it to reproduce with newer dependency version in the future.)
Build the docs using Sphinx:
Observe the output.
The text was updated successfully, but these errors were encountered: