]> source.dussan.org Git - gitea.git/commitdiff
Fix some URLs whose sub-path is missing (#31289) (#31292)
authorGiteabot <teabot@gitea.io>
Fri, 7 Jun 2024 15:43:47 +0000 (23:43 +0800)
committerGitHub <noreply@github.com>
Fri, 7 Jun 2024 15:43:47 +0000 (15:43 +0000)
Backport #31289 by wxiaoguang

Fix #31285

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
templates/admin/packages/list.tmpl
templates/devtest/fetch-action.tmpl
templates/user/settings/applications.tmpl

index 863f11da251421d5c9c2d873205abad8ff368e20..d1d77b6220158ce908711617a94daa69beb472c9 100644 (file)
@@ -5,7 +5,7 @@
                        {{ctx.Locale.Tr "admin.packages.total_size" (FileSize .TotalBlobSize)}},
                        {{ctx.Locale.Tr "admin.packages.unreferenced_size" (FileSize .TotalUnreferencedBlobSize)}})
                        <div class="ui right">
-                               <form method="post" action="/admin/packages/cleanup">
+                               <form method="post" action="{{AppSubUrl}}/admin/packages/cleanup">
                                        {{.CsrfTokenHtml}}
                                        <button class="ui primary tiny button">{{ctx.Locale.Tr "admin.packages.cleanup"}}</button>
                                </form>
index 2b25e6c9c49e449c3b261cadc74720e0b370573f..66f41fc6de0b41c409235b0eaa25f4ca5fd9f7c0 100644 (file)
@@ -25,7 +25,7 @@
                                <div><label><input name="check" type="checkbox"> check</label></div>
                                <div><button name="btn">submit post</button></div>
                        </form>
-                       <form method="post" action="/no-such-uri" class="form-fetch-action">
+                       <form method="post" action="no-such-uri" class="form-fetch-action">
                                <div class="tw-py-8">bad action url</div>
                                <div><button name="btn">submit test</button></div>
                        </form>
index 8c67653e589324b02209690c5d9ba46a567c3b2e..3c1934dd8b471f821bb132a49f1a1aa87be68c10 100644 (file)
@@ -75,7 +75,7 @@
                                                {{ctx.Locale.Tr "settings.select_permissions"}}
                                        </summary>
                                        <p class="activity meta">
-                                               <i>{{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)}}</i>
+                                               <i>{{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)}}</i>
                                        </p>
                                        <div class="scoped-access-token-mount">
                                                <scoped-access-token-selector