Skip to content

Broken links in "Search repository" result #15135

Closed
@Beh01der

Description

@Beh01der

There's a regression here.

ctx.Data["SourcePath"] = path.Join(setting.AppSubURL, ctx.Repo.Repository.Owner.Name, ctx.Repo.Repository.Name)

This causes search result links to be relative to the repository page.
For example, I am getting
http://git.chronos/andrey/memz-service/andrey/memz-service/src/commit/cc5f663c1a4aa05b60c0060f99869c90bf9a493d/web/dev/tinymce/plugins/example/dialog.html
instead of
http://git.chronos/andrey/memz-service/src/commit/cc5f663c1a4aa05b60c0060f99869c90bf9a493d/web/dev/tinymce/plugins/example/dialog.html

Older version
ctx.Data["SourcePath"] = setting.AppSubURL + "/" + path.Join(ctx.Repo.Repository.Owner.Name, ctx.Repo.Repository.Name)
works fine

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions