gitea/routers
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
..
api fix(api): owner ID should be zero when created repo secret (#31715) (#31811) 2024-08-10 00:21:51 +08:00
common Fix missing images in editor preview due to wrong links (#31299) (#31393) 2024-06-17 15:07:21 +08:00
install Always load or generate oauth2 jwt secret (#30942) (#30978) 2024-05-14 15:00:38 +00:00
private Fix protected branch files detection on pre_receive hook (#31778) (#31796) 2024-08-08 03:08:30 +00:00
utils Refactor external URL detection (#29973) 2024-03-22 04:32:40 +08:00
web Fix raw wiki links (#31825) (#31845) 2024-08-17 03:19:26 +00:00
init.go Make sure git version&feature are always prepared (#30877) (#30879) 2024-05-07 02:07:33 +00:00