We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
https://pkg.go.dev/snai.pe/boa@v0.0.0-20220207080157-b18178b71668
Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0
Here is the source of the README: https://raw.githubusercontent.com/Snaipe/boa/9ac3c07bc342a675b3bd5dbda8ca58c5c5b0ea96/README.md
You'll notice on the first line that the <h1> tag has align="center".
<h1>
align="center"
I expected the image to be centered. Github renders the image as such: https://github.com/Snaipe/boa/blob/9ac3c07bc342a675b3bd5dbda8ca58c5c5b0ea96/README.md
The image is not centered. It seems to be because the align attribute is not allowed in the sanitized HTML: https://github.com/golang/pkgsite/blob/a70a3c2b473c9294b83bc93a6068c8ebcc9c4ecb/internal/frontend/readme.go#L169
I think allowing the attribute on heading seems innocent enough. Thoughts?
The text was updated successfully, but these errors were encountered:
A workaround for this issue seems to be wrapping the HTML with an outer <div> and putting the align tag on that div. The result is indeed centered.
<div>
Sorry, something went wrong.
I think it is reasonable to allow the align attribute.
No branches or pull requests
What is the URL of the page with the issue?
https://pkg.go.dev/snai.pe/boa@v0.0.0-20220207080157-b18178b71668
What is your user agent?
Mozilla/5.0 (X11; Linux x86_64; rv:96.0) Gecko/20100101 Firefox/96.0
Screenshot
What did you do?
Here is the source of the README: https://raw.githubusercontent.com/Snaipe/boa/9ac3c07bc342a675b3bd5dbda8ca58c5c5b0ea96/README.md
You'll notice on the first line that the
<h1>
tag hasalign="center"
.What did you expect to see?
I expected the image to be centered. Github renders the image as such: https://github.com/Snaipe/boa/blob/9ac3c07bc342a675b3bd5dbda8ca58c5c5b0ea96/README.md
What did you see instead?
The image is not centered. It seems to be because the align attribute is not allowed in the sanitized HTML: https://github.com/golang/pkgsite/blob/a70a3c2b473c9294b83bc93a6068c8ebcc9c4ecb/internal/frontend/readme.go#L169
I think allowing the attribute on heading seems innocent enough. Thoughts?
The text was updated successfully, but these errors were encountered: