Skip to content

Navigation to footnote fragment throws JS error #34590

Closed
@badhezi

Description

@badhezi

Description

When navigating to a footnote html fragment, a JS error is thrown saying the referenced id does not exist.
https://demo.gitea.com/badhezi/test-footnotes/pulls/1#fn:user-content-1

JavaScript error: Failed to execute 'querySelector' on 'Document': '#user-content-fn:user-content-1' is not a valid selector. (https://demo.gitea.com/assets/js/index.js?v=1.25.0~dev-90-gd5bbaee64e @ 30:70572). Open browser console to see more details.

I'm not sure yet why it tries to find this id (user-content-fn:user-content-1) when it's actually fn:user-content-1
discovered this when trying to reproduce #34511 which should probably be considered when resolving this as well.

Gitea Version

1.25.0+dev-90-gd5bbaee64e

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Image

Git Version

.25.0+dev-90-gd5bbaee64e

Operating System

No response

How are you running Gitea?

it's demo.gitea.com

Database

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions