diff --git a/Router.go b/Router.go index 349a3a4..67fc09e 100644 --- a/Router.go +++ b/Router.go @@ -157,9 +157,9 @@ func (this *ArchiveServer) legacyRoute(w http.ResponseWriter, r *http.Request) { if u.hasGet("q") { if u.hasGet("rx") { - u.redirectf(`/%d/rx/%s`, hubid, url.QueryEscape(u.get("q"))) + u.redirectf(`/%d/rx/%s`, hubid, url.PathEscape(u.get("q"))) } else { - u.redirectf(`/%d/search/%s`, hubid, url.QueryEscape(u.get("q"))) + u.redirectf(`/%d/search/%s`, hubid, url.PathEscape(u.get("q"))) } } else if u.hasGet("y") && u.hasGet("m") { diff --git a/util.go b/util.go index 715fe84..6a35ba0 100644 --- a/util.go +++ b/util.go @@ -25,7 +25,7 @@ func (this *URLHelper) intval(sz string) int { } func (this *URLHelper) get(sz string) string { - return this.r.URL.Query().Get(sz) + return this.r.URL.Query().Get(sz) // n.b. automatically unescaped } func (this *URLHelper) hasGet(sz string) bool {