markdown image links are wrong if repo is called 'src' #11468

Closed
opened 2025-11-02 09:38:44 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @rmie on GitHub (Aug 16, 2023).

Originally assigned to: @KN4CK3R on GitHub.

Description

Ack, this is an edge case.

We have a repo called src, and amazingly all links to images in markdown are wrong (404).

for example:

document: https://host/org/src/src/commit/...
actual img src: https://host/org/media/src/commit/...
expected img src: https://host/org/src/media/commit/...

It looks like the the first, instead of the second. occurrence of "src" is replaced by "media".

try.gitea.io

suspected location

Gitea Version

1.19.3

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

docker

Database

None

Originally created by @rmie on GitHub (Aug 16, 2023). Originally assigned to: @KN4CK3R on GitHub. ### Description Ack, this is an edge case. We have a repo called src, and amazingly all links to images in markdown are wrong (404). for example: document: https://host/org/src/src/commit/... actual img src: https://host/org/media/src/commit/... expected img src: https://host/org/src/media/commit/... It looks like the the first, instead of the second. occurrence of "src" is replaced by "media". [try.gitea.io](https://try.gitea.io/rmie/src/src/branch/main/README.md) [suspected location](https://github.com/go-gitea/gitea/blob/1432d4eab94814db267577ec911a3375a1269fc0/modules/markup/html.go#L412) ### Gitea Version 1.19.3 ### Can you reproduce the bug on the Gitea demo site? Yes ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? docker ### Database None
GiteaMirror added the type/bug label 2025-11-02 09:38:44 -06:00
Author
Owner

@KN4CK3R commented on GitHub (Aug 26, 2023):

Fixed with #26745

@KN4CK3R commented on GitHub (Aug 26, 2023): Fixed with #26745
Author
Owner

@github-actions[bot] commented on GitHub (Mar 1, 2024):

Automatically locked because of our CONTRIBUTING guidelines

@github-actions[bot] commented on GitHub (Mar 1, 2024): Automatically locked because of our [CONTRIBUTING guidelines](https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md#issue-locking)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11468