From d7be8677d480203169281aeffb48d923dc248b44 Mon Sep 17 00:00:00 2001 From: NorthRealm <155140859+NorthRealm@users.noreply.github.com> Date: Wed, 28 May 2025 11:40:48 +0800 Subject: [PATCH] update --- routers/web/repo/actions/view.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routers/web/repo/actions/view.go b/routers/web/repo/actions/view.go index 5531743576..7ad4f95a78 100644 --- a/routers/web/repo/actions/view.go +++ b/routers/web/repo/actions/view.go @@ -87,11 +87,11 @@ func ViewWorkflowFile(ctx *context_module.Context) { } for _, entry := range entries { if entry.Name() == run.WorkflowID { - ctx.Redirect(fmt.Sprintf("%s/src/commit/%s/%s/%s", ctx.Repo.RepoLink, run.CommitSHA, rpath, run.WorkflowID)) + ctx.Redirect(fmt.Sprintf("%s/src/commit/%s/%s/%s", ctx.Repo.RepoLink, url.PathEscape(run.CommitSHA), util.PathEscapeSegments(rpath), url.PathEscape(run.WorkflowID))) return } } - ctx.JSONErrorNotFound() + ctx.NotFound(nil) } type LogCursor struct {