Skip to content

Commit

Permalink
Export query-unescaped variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
tcard committed May 23, 2013
1 parent 67d593f commit 030d0d3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion regexp.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 222,12 @@ func (v *routeRegexpGroup) setMatch(req *http.Request, m *RouteMatch, r *Route)
pathVars := v.path.regexp.FindStringSubmatch(uri)
if pathVars != nil {
for i, n := range v.path.varsN {
m.Vars[n] = pathVars[v.path.varsI[i]]
varN := pathVars[v.path.varsI[i]]
var err error
m.Vars[n], err = url.QueryUnescape(varN)
if err != nil {
m.Vars[n] = varN
}
}
// Check if we should redirect.
if r.strictSlash {
Expand Down

0 comments on commit 030d0d3

Please sign in to comment.