@@ -100,7 +100,7 @@ func MustAllowUserComment(ctx *context.Context) {
100100
101101 if issue .IsLocked && ! ctx .Repo .CanWriteIssuesOrPulls (issue .IsPull ) && ! ctx .Doer .IsAdmin {
102102 ctx .Flash .Error (ctx .Tr ("repo.issues.comment_on_locked" ))
103- ctx .Redirect (issue .HTMLURL ())
103+ ctx .Redirect (issue .Link ())
104104 return
105105 }
106106}
@@ -927,7 +927,7 @@ func NewIssueChooseTemplate(ctx *context.Context) {
927927
928928 if len (issueTemplates ) == 0 {
929929 // The "issues/new" and "issues/new/choose" share the same query parameters "project" and "milestone", if no template here, just redirect to the "issues/new" page with these parameters.
930- ctx .Redirect (fmt .Sprintf ("%s/issues/new?%s" , ctx .Repo .Repository .HTMLURL (), ctx .Req .URL .RawQuery ), http .StatusSeeOther )
930+ ctx .Redirect (fmt .Sprintf ("%s/issues/new?%s" , ctx .Repo .Repository .Link (), ctx .Req .URL .RawQuery ), http .StatusSeeOther )
931931 return
932932 }
933933
@@ -950,11 +950,11 @@ func DeleteIssue(ctx *context.Context) {
950950 }
951951
952952 if issue .IsPull {
953- ctx .Redirect (fmt .Sprintf ("%s/pulls" , ctx .Repo .Repository .HTMLURL ()), http .StatusSeeOther )
953+ ctx .Redirect (fmt .Sprintf ("%s/pulls" , ctx .Repo .Repository .Link ()), http .StatusSeeOther )
954954 return
955955 }
956956
957- ctx .Redirect (fmt .Sprintf ("%s/issues" , ctx .Repo .Repository .HTMLURL ()), http .StatusSeeOther )
957+ ctx .Redirect (fmt .Sprintf ("%s/issues" , ctx .Repo .Repository .Link ()), http .StatusSeeOther )
958958}
959959
960960// ValidateRepoMetas check and returns repository's meta information
@@ -1425,7 +1425,7 @@ func ViewIssue(ctx *context.Context) {
14251425 return
14261426 }
14271427 // Add link to the issue of the already running stopwatch
1428- ctx .Data ["OtherStopwatchURL" ] = otherIssue .HTMLURL ()
1428+ ctx .Data ["OtherStopwatchURL" ] = otherIssue .Link ()
14291429 }
14301430 }
14311431 ctx .Data ["CanUseTimetracker" ] = ctx .Repo .CanUseTimetracker (issue , ctx .Doer )
@@ -2658,7 +2658,7 @@ func NewComment(ctx *context.Context) {
26582658
26592659 if issue .IsLocked && ! ctx .Repo .CanWriteIssuesOrPulls (issue .IsPull ) && ! ctx .Doer .IsAdmin {
26602660 ctx .Flash .Error (ctx .Tr ("repo.issues.comment_on_locked" ))
2661- ctx .Redirect (issue .HTMLURL ())
2661+ ctx .Redirect (issue .Link ())
26622662 return
26632663 }
26642664
@@ -2669,7 +2669,7 @@ func NewComment(ctx *context.Context) {
26692669
26702670 if ctx .HasError () {
26712671 ctx .Flash .Error (ctx .Data ["ErrorMsg" ].(string ))
2672- ctx .Redirect (issue .HTMLURL ())
2672+ ctx .Redirect (issue .Link ())
26732673 return
26742674 }
26752675
0 commit comments