Encode part of Url query params

Have you checked the source of the generated HTML?

Go’s html/template package does automatic encoding based on the context of the code.

Also have a look at the htmlEscape function and this topic.