Skip to content
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

x/pkgsite: Badge generator creates wrong links if provided with HTTP scheme #43458

Closed
botherder opened this issue Jan 1, 2021 · 1 comment
Closed
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite

Comments

@botherder
Copy link

What is the URL of the page with the issue?

https://pkg.go.dev/badge/

What did you do?

I entered a URL to a GitHub repository for a Go project of mine, but inclusive of the scheme https://.

What did you expect to see?

A badge URL correctly generated with the scheme stripped but github.com maintained in the URI to the reference page for the repository.

What did you see instead?

If you enter a full URL to a GitHub repo for your Go project, including the HTTP scheme, the badge generator will strip the domain name. For example:
https://pkg.go.dev/badge/?path=https://github.com/golang/go

Will generate:

[![Go Reference](https://pkg.go.dev/badge/golang/go.svg)](https://pkg.go.dev/golang/go)

While I imagine it is expected to provide a URL without scheme as with Go imports, the resulting stripping of the domain name is counter intuitive and an issue some might not notice straight away.

@gopherbot gopherbot added this to the Unreleased milestone Jan 1, 2021
@jba jba added the NeedsFix The path to resolution is known, but the work has not been done. label Jan 5, 2021
@jba jba modified the milestones: Unreleased, pkgsite/unplanned Jan 5, 2021
@gopherbot
Copy link

Change https://golang.org/cl/281712 mentions this issue: content,internal: badges form improvements

@golang golang locked and limited conversation to collaborators Jan 6, 2022
@rsc rsc unassigned jamalc Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done. pkgsite
Projects
None yet
Development

No branches or pull requests

4 participants