Closed
Description
Description
When adding a hyperlink using the "Add a link" button in issue/comment editor, pasting a URL results in incorrect Markdown formatting (double brackets) instead of replacing the placeholder text.
Steps to reproduce
- Type any text in the editor
- Select a text to use as link text
- Click the "Add a link" button on the toolbar
- The editor formats the selection to:
[Example text](url)
(with "url" pre-selected) - Paste a URL from clipboard (Ctrl+V)
Expected behavior:
The result should be: [Example text](https://example.com)
Actual behavior:
The result is: [Example text]([url](https://example.com))
Browser
Google Chrome 137.0.7151.104
Gitea Version
1.24.0
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
Ctrl+V:
Git Version
No response
Operating System
Windows 10 Pro 64-bit
How are you running Gitea?
Docker
Database
None