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 some links in HTML templates #7426

merged 2 commits into from Apr 9, 2020


Copy link

@mgeier mgeier commented Apr 6, 2020

Feature or Bugfix

  • Bugfix


If a user chooses a strange master_doc, e.g.:

master_doc = 'my"index'

... the links to the main page will be broken.

Same for logo, favicon and style sheets.

If a user chooses strange characters for sub-directories of the source directory, "previous" and "next" links might be broken, too.

@tk0miya tk0miya added this to the 3.0.1 milestone Apr 8, 2020
Copy link

@tk0miya tk0miya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+0; I suppose such characters might cause other errors. So I'd not like to support them like this approach. But I don't know what kind of characters effect to our build. Therefore this is reasonable until we determine the prohibited characters for docnames.

BTW, we have a bug fix release 3.0.1 in nearly days. So it's nice if you rebase this into the 3.0.x branch.

@mgeier mgeier changed the base branch from 3.x to 3.0.x April 8, 2020 20:21
Copy link
Contributor Author

mgeier commented Apr 8, 2020

Thanks for the review!

I suppose such characters might cause other errors.

I tried it and there were no other errors.

I don't think any of this has any real consequences. I just noticed it while creating a theme and playing around with escaping and I thought I'd make a PR, just for completeness' sake.

rebase this into the 3.0.x branch


Copy link

tk0miya commented Apr 9, 2020

I tried it and there were no other errors.

Sphinx supports many kind of formats (including 3rd party extensions). I worried these strange characters cause trouble in one of them.

@tk0miya tk0miya merged commit d9033a4 into sphinx-doc:3.0.x Apr 9, 2020
Copy link

tk0miya commented Apr 9, 2020

Thank you for rebasing. Merged.

tk0miya added a commit that referenced this pull request Apr 9, 2020
@mgeier mgeier deleted the escape-links branch April 9, 2020 18:08
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants