Skip to content

URLs to issues/pull-requests for repos or users with dash in the name are not linked correctly #18888

Closed
@rtpt-alexanderneumann

Description

@rtpt-alexanderneumann

Gitea Version

1.16.2

Git Version

2.30.2

Operating System

Debian 11

How are you running Gitea?

I'm using the released version of Gitea downloaded from GitHub as a systemd service. The same issue reproduces on https://try.gitea.io

Database

SQLite

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

Description

Full URLs to issues and pull requests are not correctly linked and there is no hover preview when the owner's name or the repository name contains a dash. For example, create the repos firstrepo and second-repo on the demo instance, create an issue in each of them and then submit the following text as a new issue:

 * https://try.gitea.io/username/firstrepo/issues/1
 * https://try.gitea.io/username/second-repo/issues/1

It is rendered as:

 * username/firstrepo#1
 * https://try.gitea.io/username/second-repo/issues/1

Screenshots

screenshot1
screenshot2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions