Skip to content

Markdown links started with / broken in 1.23 #33274

Closed
@didim99

Description

@didim99

Description

If you paste a link tag in any place (MD files, issues, comments) started with leading / (without domain) it don't works anymore in 1.23. I'm not sure about 1.22.5 or 1.22.6 but for 1.22.4 or older version this kind of links works perfectly: parsed as absolute URL for whole Gitea instance (domain). For now these liks are parsed as relative to current repository.

[works](https://yourdomain.com:9915/org/repo/readme#section)
[not works](/org/repo/readme#section) <-- works fine in 1.22.4

For example, if you want to link other repo now you need to specify full URL, including domain and port (if customized). In case of transfer Gitea instance to another domain/port it seems to be better to use absolute URLs without domain.

This change broken all our documentation system and old conversation in issues, please, fix it!

Gitea Version

1.23.1

Can you reproduce the bug on the Gitea demo site?

Yes
MD: https://demo.gitea.com/didim99/test-2/src/branch/master/readme.md
Issues: https://demo.gitea.com/didim99/test/issues/1#issue-798

Log Gist

No response

Screenshots

No response

Git Version

Not matters

Operating System

Not matters

How are you running Gitea?

Official install script (updated from 1.22.6)

Database

MySQL/MariaDB

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions