My code not rendering form in html page

I was following the official Golang tutorial https://golang.org/doc/articles/wiki/, now I’m in the part for editing a page; however, it doesn’t seem to be working
here is my code

func editHandler(w http.ResponseWriter, r *http.Request){
p := loadPage(r.URL.Path[len("/edit/"):])
fmt.Fprintf(w, <form action="/save/%s" method="POST"> <textarea name="body">%s</textarea> <button type="submit">Save</button> </form> , p.Title, string(p.Body))
}

But for some reason on the website, it shows the plain HTML
And when I Change all of the and input stuff to a simple

Hello World


All the sudden it works

I even tried to have a single line of but still, it shows plain HTML in my browser and replaces backticks with “Double quotes”
Why is this happening exactly

In fact, I found out what the issue was
If I started my Fprintf string with anything beside the h1 tag it will return plain HTML
I think this is a glitch worth reporting, how can I report exactly? or they mean to do so

No it’s not. For web applications, you are expected to know HTML: W3C HTML.

1 Like