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

Regression - after update to 1.22 wiki links to wiki pages with hyphens or dots in the name only return plain text #31395

Closed
reimer-atb opened this issue Jun 17, 2024 · 1 comment · Fixed by #31398
Labels

Comments

@reimer-atb
Copy link

Description

Steps to reproduce

  1. Create a wiki page with a hyphen - or a dot . in the name
  2. Link to that page from another wiki page

Result

Clicking on the link will only return a plain text representation of the linked wiki page's content.

Expected Result

The whole wiki page html should be returned

Additional info

This was working in gitea 1.21.8.

The auto-generated URLs for the wiki pages with a hyphen end in .- and the ones for wiki pages with a . contain the dot.

I assume that this change caused the problem.

Example project with wiki

https://demo.gitea.com/reimer-atb/test/wiki/Home

Example markdown with links that do not work

Welcome to the Wiki.

- [Test](Test) => works
- [Test with spaces](Test-with-spaces) => works
- [Test-with-hyphen](Test-with-hyphen.-) => does **not** work
- [Test+with+spaces+2024-06-17.-](Test+with+spaces+2024-06-17.-) => does **not** work
- [2024-06-17](2024-06-17.-) => does **not** work
- [17-06-2024](17-06-2024.-) => does **not** work
- [17.06.2024](17.06.2024) => does **not** work
- [06/17/2024](06%2F17%2F2024) => works
- [17/06/2024](17%2F06%2F2024) => works

Gitea Version

1.22.0

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?

Tested on demo.gitea.com and on a private gitea 1.22.0 instance (no idea how that is run because it is provided by someone else).

Database

None

@wxiaoguang
Copy link
Contributor

-> Fix rendered wiki page link #31398

wxiaoguang added a commit that referenced this issue Jun 18, 2024
wxiaoguang added a commit to wxiaoguang/gitea that referenced this issue Jun 18, 2024
Fix go-gitea#31395
# Conflicts:
#	modules/markup/markdown/transform_link.go
#	routers/web/repo/view.go
wxiaoguang added a commit that referenced this issue Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants