fix url decoding in route args

This commit is contained in:
Leo Horie 2014-05-07 23:09:27 -04:00
parent 85685f55b0
commit a80621e3a6
2 changed files with 19 additions and 1 deletions

View file

@ -312,7 +312,7 @@ Mithril = m = new function app(window) {
return !void path.replace(matcher, function() {
var keys = route.match(/:[^\/]+/g)
var values = [].slice.call(arguments, 1, -2)
for (var i = 0; i < keys.length; i++) routeParams[keys[i].replace(/:|\./g, "")] = values[i]
for (var i = 0; i < keys.length; i++) routeParams[keys[i].replace(/:|\./g, "")] = decodeURIComponent(values[i])
m.module(root, router[route])
})
}