go.tools/cmd/godoc: permit dash and capitals in redirect paths

This was causing some /blog/foo-bar-baz paths to 404.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/13640044
This commit is contained in:
Andrew Gerrand 2013-09-16 13:02:15 +10:00
parent 1564988897
commit 334d56a124
1 changed files with 1 additions and 1 deletions

View File

@ -165,7 +165,7 @@ func makeRedirectHandler(target string) http.HandlerFunc {
}
}
var validId = regexp.MustCompile(`^[a-z0-9]*$`)
var validId = regexp.MustCompile(`^[A-Za-z0-9-]*$`)
func makePrefixRedirectHandler(prefix, baseURL string) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {