Hey @emb,
Have a look at this question here.
I wrote the poster an answer which I believe answers this question too
Here’s my answer to the poster’s question: Html/template still escaping template.URL in <a href>?
Basically, encoding with +
is still correct and if you run the following for an example, you’ll see it still takes you to the correct link:
package main
import (
"fmt"
"log"
"net/http"
)
func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "text/html")
fmt.Fprintln(w, "<a href='http://google.com/?q=hello+world'>hello+world</a>")
})
log.Fatal(http.ListenAndServe(":9000", nil))
}