gitea/routers/web
Giteabot 3fe1f73268
Fix raw wiki links (#31825) (#31845)
Backport #31825 by @Zettat123

Fix #31395

This regression is introduced by #30273. To find out how GitHub handles
this case, I did [some
tests](https://github.com/go-gitea/gitea/issues/31395#issuecomment-2278929115).

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 <zettat123@gmail.com>
Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-08-17 03:19:26 +00:00
..
admin Add missed return after ctx.ServerError (#31130) (#31133) 2024-05-28 12:47:11 +02:00
auth Add missed return after ctx.ServerError (#31130) (#31133) 2024-05-28 12:47:11 +02:00
devtest Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
events Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
explore Add missing repository type filter parameters to pager (#31832) (#31837) 2024-08-16 20:41:45 +08:00
feed Rename Str2html to SanitizeHTML and clarify its behavior (#29516) 2024-03-01 10:16:19 +00:00
healthcheck Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
misc Make sure git version&feature are always prepared (#30877) (#30879) 2024-05-07 02:07:33 +00:00
org Add missing repository type filter parameters to pager (#31832) (#31837) 2024-08-16 20:41:45 +08:00
repo Fix raw wiki links (#31825) (#31845) 2024-08-17 03:19:26 +00:00
shared Fix various problems around projects board view (#30696) (#30902) 2024-05-08 15:46:21 +00:00
user Add missing repository type filter parameters to pager (#31832) (#31837) 2024-08-16 20:41:45 +08:00
base.go Fix panic in storageHandler (#27446) 2023-10-06 13:23:14 +00:00
githttp.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
goget.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
home.go migrate some more "OptionalBool" to "Option[bool]" (#29479) 2024-02-29 18:52:49 +00:00
metrics.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
nodeinfo.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
passkey.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
swagger_json.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00
web.go Fix markup preview (#31158) (#31166) 2024-05-30 02:38:30 +02:00
webfinger.go Move context from modules to services (#29440) 2024-02-27 08:12:22 +01:00