Re: [go-nuts] html/template: urlEscaper uses small letters to escape, whereas URLQueryEscaper uses capitals

2018-04-20 Thread Ian Lance Taylor
On Thu, Apr 19, 2018 at 9:35 PM, wrote: > > i noticed that html/template escapes a URI using small letters. For example, > the following code outputs "%e5%af%bf%e5%8f%b8", not "%E5%AF%BF%E5%8F%B8". > > t, _ := template.New("foo").Parse(`{{define "T"}}

[go-nuts] html/template: urlEscaper uses small letters to escape, whereas URLQueryEscaper uses capitals

2018-04-20 Thread nekketsuuu
i noticed that html/template escapes a URI using small letters. For example, the following code outputs "%e5%af%bf%e5%8f%b8", not " %E5%AF%BF%E5%8F%B8". t, _ := template.New("foo").Parse(`{{define "T"}}{{end}}`) t.ExecuteTemplate(os.Stdout, "T", "寿司") (See https://play.golang.org/p/9caza-3ojur )