{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/15891","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/15891/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/15891/comments","events_url":"https://api.github.com/repos/golang/go/issues/15891/events","html_url":"https://github.com/golang/go/issues/15891","id":157518702,"number":15891,"title":"net/http: `stateURL` template context percent encodes \"(\" and \")\"","user":{"login":"gmccue","id":1085902,"avatar_url":"https://avatars.githubusercontent.com/u/1085902?v=3","gravatar_id":"","url":"https://api.github.com/users/gmccue","html_url":"https://github.com/gmccue","followers_url":"https://api.github.com/users/gmccue/followers","following_url":"https://api.github.com/users/gmccue/following{/other_user}","gists_url":"https://api.github.com/users/gmccue/gists{/gist_id}","starred_url":"https://api.github.com/users/gmccue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmccue/subscriptions","organizations_url":"https://api.github.com/users/gmccue/orgs","repos_url":"https://api.github.com/users/gmccue/repos","events_url":"https://api.github.com/users/gmccue/events{/privacy}","received_events_url":"https://api.github.com/users/gmccue/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/38","html_url":"https://github.com/golang/go/milestones/Go1.8","labels_url":"https://api.github.com/repos/golang/go/milestones/38/labels","id":1709363,"number":38,"title":"Go1.8","description":"","creator":{"login":"griesemer","id":8528975,"avatar_url":"https://avatars.githubusercontent.com/u/8528975?v=3","gravatar_id":"","url":"https://api.github.com/users/griesemer","html_url":"https://github.com/griesemer","followers_url":"https://api.github.com/users/griesemer/followers","following_url":"https://api.github.com/users/griesemer/following{/other_user}","gists_url":"https://api.github.com/users/griesemer/gists{/gist_id}","starred_url":"https://api.github.com/users/griesemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/griesemer/subscriptions","organizations_url":"https://api.github.com/users/griesemer/orgs","repos_url":"https://api.github.com/users/griesemer/repos","events_url":"https://api.github.com/users/griesemer/events{/privacy}","received_events_url":"https://api.github.com/users/griesemer/received_events","type":"User","site_admin":false},"open_issues":244,"closed_issues":14,"state":"open","created_at":"2016-04-15T16:30:23Z","updated_at":"2016-05-30T19:04:41Z","due_on":"2017-02-01T08:00:00Z","closed_at":null},"comments":2,"created_at":"2016-05-30T15:00:44Z","updated_at":"2016-05-30T19:05:00Z","closed_at":null,"body":"The `html/template` context `stateURL` appears to be percent encoding valid characters. I believe this is because `shouldEscape()` in `net/url` encodes these characters by default: https://github.com/ecosia/go/blob/master/src/net/url/url.go#L101\r\n\r\nRFC3986 allows for the use of `(` and `)` characters in the query component: https://tools.ietf.org/html/rfc3986#section-3.4\r\n\r\n1. What version of Go are you using (`go version`)?\r\n1.6.2\r\n\r\n2. What operating system and processor architecture are you using (`go env`)?\r\nlinux/amd64\r\n\r\n3. What did you do?\r\nCreate a template with a variable to be used for the `href` attribute. Pass a URL including `(` or `)` to the template and compile. `(` and `)` are percent encoded during compilation. \r\nAn example on play.golang.org: https://play.golang.org/p/QFtR42GyfI\r\n\r\n4. What did you expect to see?\r\n`<a href=\"http://my.domain/path-to-lang(en)\">Click this link.</a>`\r\n\r\n5. What did you see instead?\r\n`<a href=\"http://my.domain/path-to-lang%28en%29\">Click this link.</a>`\r\n"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/222541987","html_url":"https://github.com/golang/go/issues/15891#issuecomment-222541987","issue_url":"https://api.github.com/repos/golang/go/issues/15891","id":222541987,"user":{"login":"ianlancetaylor","id":3194333,"avatar_url":"https://avatars.githubusercontent.com/u/3194333?v=3","gravatar_id":"","url":"https://api.github.com/users/ianlancetaylor","html_url":"https://github.com/ianlancetaylor","followers_url":"https://api.github.com/users/ianlancetaylor/followers","following_url":"https://api.github.com/users/ianlancetaylor/following{/other_user}","gists_url":"https://api.github.com/users/ianlancetaylor/gists{/gist_id}","starred_url":"https://api.github.com/users/ianlancetaylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ianlancetaylor/subscriptions","organizations_url":"https://api.github.com/users/ianlancetaylor/orgs","repos_url":"https://api.github.com/users/ianlancetaylor/repos","events_url":"https://api.github.com/users/ianlancetaylor/events{/privacy}","received_events_url":"https://api.github.com/users/ianlancetaylor/received_events","type":"User","site_admin":false},"created_at":"2016-05-30T19:05:00Z","updated_at":"2016-05-30T19:05:00Z","body":"Does this extra encoding cause any harm?"}}
{"actor":{"display_login":"ianlancetaylor"}}