Skip to content

Anchor not found false positive #14255

Description

@zaufi

Describe the bug

I have a document with the following URL: https://docs.fedoraproject.org/en-US/packaging-guidelines/#changelogs. However, link checker reports:

broken    https://docs.fedoraproject.org/en-US/packaging-guidelines/#changelogs - Anchor 'changelogs' not found

which is obviously false :(

How to Reproduce

To reproduce, create the document:

Link to changelogs_ section.

.. _changelogs:: https://docs.fedoraproject.org/en-US/packaging-guidelines/#changelogs

and link check it

Environment Information

Platform:              linux; (Linux-6.18.4-z1-x86_64-with-glibc2.42)
Python version:        3.13.11 (main, Dec 10 2025, 14:55:09) [GCC 15.2.0])
Python implementation: CPython
Sphinx version:        8.2.3
Docutils version:      0.22.4
Jinja2 version:        3.1.6
Pygments version:      2.19.2

Sphinx extensions

Additional context

No response

Activity

  1. jayaddison commented on Jan 12, 2026

    @jayaddison
    Contributor

    Thank you for the bugreport @zaufi!

    NB: some of the styling/formatting of the repro case may be a little messed up -- I had to de-duplicate one of the double-colons, and to add a couple of backticks around the use of the hyperlink when reproing this locally.

    I am able to replicate the problem, and from adding some debug print statments -- I think this is due to the use of Anubis on the website; Sphinx's linkcheck builder doesn't evaluate any scripting from the received HTML, so it won't pass the proof-of-work challenge that most human-operated browsers perform by default to reach the destination HTML page with the changelogs anchor.

  2. zaufi commented on Jan 13, 2026

    @zaufi
    Author

    I am able to replicate the problem, and from adding some debug print statments -- I think this is due to the use of Anubis on the website; Sphinx's linkcheck builder doesn't evaluate any scripting from the received HTML, so it won't pass the proof-of-work challenge that most human-operated browsers perform by default to reach the destination HTML page with the changelogs anchor.

    Hmm... I'm able to download the page with curl:

    $ curl -s 'https://docs.fedoraproject.org/en-US/packaging-guidelines/#changelogs' | grep changelogs
    <h2 id="changelogs"><a class="anchor" href="#changelogs"></a>Changelogs</h2>
    Links to upstream NEWS files or changelogs can be entered

    I'm not sure if curl performs any "proof-of-work"... intuition tells me it's not %)

  3. nvetrini commented on Jan 15, 2026

    @nvetrini

    Hmm... I'm able to download the page with curl:

    $ curl -s 'https://docs.fedoraproject.org/en-US/packaging-guidelines/#changelogs' | grep changelogs

    Changelogs

    Links to upstream NEWS files or changelogs can be entered

    I'm not sure if curl performs any "proof-of-work"... intuition tells me it's not %)

    Perhaps Anubis can detect that it's coming from curl via the user agent and thus use a different mechanism than the one used for linkcheck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions