Commit and issue comment hyperlinks surrounded by brackets broken in issue comments #3759

Closed
opened 2025-11-02 05:24:22 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @vg-c on GitHub (Aug 10, 2019).

  • Gitea version (or commit ref): 1.8.3
  • Git version: 2.17.2
  • Operating system: Amazon Linux 2
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When a hyperlink to a commit or to an issue comment is surrounded by brackets in an issue comment, the parser/renderer includes the closing bracket with the hyperlink. The way it is rendered is shown in Screenshot 1, if you click on such a hyperlink then the Gitea web server weirdly asks for authentication, as shown in Screenshot 2, but even after authentication it doesn't work because of the closing bracket in the link, as shown in Screenshot 3.

I found that there is a way to avoid the parser/renderer from including the closing brackets in the link: if you add a space, dash, and some text after the closing bracket.

Annoyingly, I cannot reproduce this on try.gitea.io, all test cases work fine there: https://try.gitea.io/vg-c/testhyperlinks/issues/1

The Gitea server that I use is on a private AWS instance, but I'm pretty sure the bug could be reproduced with the specs given above.

Screenshots

  1. Rendering of a commit hyperlink surrounded by brackets in an issue comment:

Screenshot_2019-08-10_06-24-46

  1. What happens when you click on that hyperlink:

Screenshot_2019-08-10_06-28-02

  1. After authentication:

Screenshot_2019-08-10_06-55-01

Originally created by @vg-c on GitHub (Aug 10, 2019). - Gitea version (or commit ref): 1.8.3 - Git version: 2.17.2 - Operating system: Amazon Linux 2 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - [ ] Not relevant - Log gist: ## Description When a hyperlink to a commit or to an issue comment is surrounded by brackets in an issue comment, the parser/renderer includes the closing bracket with the hyperlink. The way it is rendered is shown in Screenshot 1, if you click on such a hyperlink then the Gitea web server weirdly asks for authentication, as shown in Screenshot 2, but even after authentication it doesn't work because of the closing bracket in the link, as shown in Screenshot 3. I found that there is a way to avoid the parser/renderer from including the closing brackets in the link: if you add a space, dash, and some text after the closing bracket. Annoyingly, I cannot reproduce this on try.gitea.io, all test cases work fine there: https://try.gitea.io/vg-c/testhyperlinks/issues/1 The Gitea server that I use is on a private AWS instance, but I'm pretty sure the bug could be reproduced with the specs given above. ## Screenshots 1. Rendering of a commit hyperlink surrounded by brackets in an issue comment: ![Screenshot_2019-08-10_06-24-46](https://user-images.githubusercontent.com/53275866/62818623-351af580-bb39-11e9-8d56-e3dd4b408fed.png) 2. What happens when you click on that hyperlink: ![Screenshot_2019-08-10_06-28-02](https://user-images.githubusercontent.com/53275866/62818624-35b38c00-bb39-11e9-9935-f4f52bf9f4fc.png) 3. After authentication: ![Screenshot_2019-08-10_06-55-01](https://user-images.githubusercontent.com/53275866/62818799-fdfa1380-bb3b-11e9-8dd2-cb38dcaea9a2.png)
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 05:24:22 -06:00
Author
Owner

@stale[bot] commented on GitHub (Oct 9, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Oct 9, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@lafriks commented on GitHub (Oct 14, 2019):

Probably fixed in #8261 reopen if not

@lafriks commented on GitHub (Oct 14, 2019): Probably fixed in #8261 reopen if not
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3759