-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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 - 1.22 wiki links which contain dots point to "raw" media and only return plain text #31395
Comments
-> Fix rendered wiki page link #31398 |
Fix go-gitea#31395 # Conflicts: # modules/markup/markdown/transform_link.go # routers/web/repo/view.go
@wxiaoguang please re-open because this is not fixed completely yet. Links are still broken if a wiki page's title contains a dot Example pages:
|
There is still a regression, from "Use raw Wiki links for non-renderable Wiki files (#30273)"
ps: I don't have time to work on Gitea at the moment. So if anyone has interest, feel free to fix or revert. |
I did some tests on GitHub. The link in
I think we can fix the issue like GitHub does. We can check if the corresponding |
Fix go-gitea#31395 This regression is introduced by go-gitea#30273. To find out how GitHub handles this case, I did [some tests](go-gitea#31395 (comment)). I use redirect in this PR instead of checking if the corresponding `.md` file exists when rendering the link because GitHub also uses redirect. With this PR, there is no need to resolve the raw wiki link when rendering a wiki page. If a wiki link points to a raw file, access will be redirected to the raw link.
Backport #31825 by @Zettat123 Fix #31395 This regression is introduced by #30273. To find out how GitHub handles this case, I did [some tests](#31395 (comment)). I use redirect in this PR instead of checking if the corresponding `.md` file exists when rendering the link because GitHub also uses redirect. With this PR, there is no need to resolve the raw wiki link when rendering a wiki page. If a wiki link points to a raw file, access will be redirected to the raw link. --------- Co-authored-by: Zettat123 <[email protected]> Co-authored-by: yp05327 <[email protected]> Co-authored-by: Lunny Xiao <[email protected]>
Description
Steps to reproduce
-
or a dot.
in the nameResult
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
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
The text was updated successfully, but these errors were encountered: