Skip to content
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

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

Closed
2 of 7 tasks
vg-c opened this issue Aug 10, 2019 · 2 comments
Closed
2 of 7 tasks
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug

Comments

@vg-c
Copy link

vg-c commented 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

@stale
Copy link

stale bot commented 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 stale bot added the issue/stale label Oct 9, 2019
@lunny lunny added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Oct 9, 2019
@stale stale bot removed the issue/stale label Oct 9, 2019
@lafriks
Copy link
Member

lafriks commented Oct 14, 2019

Probably fixed in #8261 reopen if not

@lafriks lafriks closed this as completed Oct 14, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
Development

No branches or pull requests

3 participants