-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
URLs to issues/pull-requests for repos or users with dash in the name are not linked correctly #18888
Comments
It looks like there's a mismatch between the set of characters of valid repo/usernames and the regexp used for matching full URLs. For the user/repo names the only reference I found is here, but it does not match upper case characters: gitea/modules/references/references.go Line 25 in e4ef61e
The regex used to match full URLs, which uses Lines 101 to 103 in e4ef61e
I propose to extend the regex from |
No, it's ok without escaping. I was wrong. |
Ok, thanks for the feedback. I used a wrong test case first and thought you were right... |
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
andsecond-repo
on the demo instance, create an issue in each of them and then submit the following text as a new issue:It is rendered as:
Screenshots
The text was updated successfully, but these errors were encountered: