From bbe98a3254e65eb8b9ec8fddf5e0ffe416a96614 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 7 Jun 2024 23:43:47 +0800 Subject: [PATCH] Fix some URLs whose sub-path is missing (#31289) (#31292) Backport #31289 by wxiaoguang Fix #31285 Co-authored-by: wxiaoguang --- templates/admin/packages/list.tmpl | 2 +- templates/devtest/fetch-action.tmpl | 2 +- templates/user/settings/applications.tmpl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/admin/packages/list.tmpl b/templates/admin/packages/list.tmpl index 863f11da25..d1d77b6220 100644 --- a/templates/admin/packages/list.tmpl +++ b/templates/admin/packages/list.tmpl @@ -5,7 +5,7 @@ {{ctx.Locale.Tr "admin.packages.total_size" (FileSize .TotalBlobSize)}}, {{ctx.Locale.Tr "admin.packages.unreferenced_size" (FileSize .TotalUnreferencedBlobSize)}})
-
+ {{.CsrfTokenHtml}}
diff --git a/templates/devtest/fetch-action.tmpl b/templates/devtest/fetch-action.tmpl index 2b25e6c9c4..66f41fc6de 100644 --- a/templates/devtest/fetch-action.tmpl +++ b/templates/devtest/fetch-action.tmpl @@ -25,7 +25,7 @@
-
+
bad action url
diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl index 8c67653e58..3c1934dd8b 100644 --- a/templates/user/settings/applications.tmpl +++ b/templates/user/settings/applications.tmpl @@ -75,7 +75,7 @@ {{ctx.Locale.Tr "settings.select_permissions"}}

- {{ctx.Locale.Tr "settings.access_token_desc" (`href="/api/swagger" target="_blank"`|SafeHTML) (`href="https://docs.gitea.com/development/oauth2-provider#scopes" target="_blank"`|SafeHTML)}} + {{ctx.Locale.Tr "settings.access_token_desc" (HTMLFormat `href="%s/api/swagger" target="_blank"` AppSubUrl) (`href="https://docs.gitea.com/development/oauth2-provider#scopes" target="_blank"`|SafeHTML)}}