Mark down image adds unexpected link #3035

Closed
opened 2025-11-02 04:58:11 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @bjornbouetsmith on GitHub (Mar 10, 2019).

Description

When adding a image to a README.md gitea automatically adds a link to the same image, which makes it impossible to control what should happen when/if people clicks on the image. Just like the below image, which has been created with just the image markdown.

i.e.
bjornbouetsmith

I can see that it also happens here, so at least its consistent.

Expected result is that only the <img> tag is inserted and not a <a href><img></a>

Originally created by @bjornbouetsmith on GitHub (Mar 10, 2019). - Gitea version (or commit ref): 1.5.3 - Git version: - Operating system: Debian Stretch - Database : - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes - [ ] No - [ ] Not relevant https://try.gitea.io/bjornbouetsmith/test2/src/branch/master/README.md ## Description When adding a image to a README.md gitea automatically adds a link to the same image, which makes it impossible to control what should happen when/if people clicks on the image. Just like the below image, which has been created with just the image markdown. i.e. ![bjornbouetsmith](https://secure.gravatar.com/avatar/fd7ad6356aae22ddfb646fc86b0b576e?d=identicon) I can see that it also happens here, so at least its consistent. Expected result is that only the &lt;img&gt; tag is inserted and not a &lt;a href&gt;&lt;img&gt;&lt;/a&gt;
GiteaMirror added the issue/stale label 2025-11-02 04:58:11 -06:00
Author
Owner

@zeripath commented on GitHub (Mar 11, 2019):

Does using embedded html work?

@zeripath commented on GitHub (Mar 11, 2019): Does using embedded html work?
Author
Owner

@stale[bot] commented on GitHub (May 10, 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 (May 10, 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

@stale[bot] commented on GitHub (May 24, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (May 24, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#3035