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: responseText links in internal/frontend/fetch.go should be clickable #40306
Comments
@julieqiu Before moving ahead, I want to conform about the responseText messages with clickable links
and for https://github.com/golang/pkgsite/blob/master/internal/frontend/fetch.go#L190 responseText would be
shall I go ahead with these responseText messages? some guidelines would be helpful :) |
Please do, thanks @vikramcse! Some minor tweaks:
|
Hi @julieqiu responseText contains text with html containt (anchor tag) below code snippet from https://github.com/golang/pkgsite/blob/master/internal/frontend/details.go#L502 which renders the errors epage: &errorPage{
messageTemplate: template.MakeTrustedTemplate(`
<h3 class="Error-message">{{.StatusText}}</h3>
<p class="Error-message">{{.Response}}</p>`),
MessageData: struct{ StatusText, Response string }{http.StatusText(status), responseText},
} I tried looking into the documentation of package https://github.com/google/safehtml to convert I also tried what could be the proper method the parse above text? |
Change https://golang.org/cl/277117 mentions this issue: |
When frontend /fetch endpoint returns a response with a status 303 or 404-(but see module page), there are links in the response text that would ideally be clickable. See:
The text was updated successfully, but these errors were encountered: