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
html template package renders escaped version of html (unexpected) #26392
Comments
Have you checked what output the |
but why adding h1 element resolve render issue. |
The issue is that the web browser doesn’t know that the page is HTML. You need to set the Content-Type header. Add |
If you don't set
And
is But
is I don't think this is a bug. HTML should start with |
@crvv @carlmjohnson |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.10.3 linux/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
What did you do?
What did you expect to see?
interpreted html by browser:
What did you see instead?
escaped version:
*But if we add
<h1>Hello</h1>
ordiv
to 'view_product.html', browser renders correctly, (tested on chrome, firefox)view_product.html -- working version which for some reason renders correctly
There is unexpected behavior, which is not consistent.
The text was updated successfully, but these errors were encountered: