use safe decode function ,for robust

safe decode function from
https://github.com/alexmingoia/koa-router/blob/master/lib/route.js#L202