-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dublicate AppSubUrl in context_menu template #26060
Labels
Comments
KN4CK3R
pushed a commit
that referenced
this issue
Jul 23, 2023
GiteaBot
pushed a commit
to GiteaBot/gitea
that referenced
this issue
Jul 23, 2023
project-mirrors-bot-tu bot
pushed a commit
to project-mirrors/forgejo-as-gitea-fork
that referenced
this issue
Jan 23, 2025
…gitea#26067) Backport go-gitea#26066 by @lunny Fix go-gitea#26060 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> (cherry picked from commit ab4fd9a)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
"Copy Link" in
templates/repo/issue/view_content/context_menu.tmpl
is constructed this way:data-clipboard-text="{{AppSubUrl}}{{$referenceUrl}}"
. It seems that{{AppSubUrl}}
is redundant:$referenceUrl
->.ctxData.Issue.Link
->func (issue *Issue) Link() string
func (issue *Issue) Link() string
->fmt.Sprintf("%s/%s/%d", issue.Repo.Link(), path, issue.Index)
issue.Repo.Link()
->setting.AppSubURL + "/" + url.PathEscape(repo.OwnerName) + "/" + url.PathEscape(repo.Name)
As you can see there is already AppSubURL in referenceUrl so it looks like that it should be removed from the template.
Gitea Version
1.20
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
docker
Database
SQLite
The text was updated successfully, but these errors were encountered: