client/general: improve URL escaping

Specifically, cater for /, + and % in URL components.
This commit is contained in:
rr-
2016-09-04 01:25:19 +02:00
parent a22fe306d1
commit 7fa8593b0a
15 changed files with 39 additions and 26 deletions

View File

@ -75,7 +75,7 @@ class Route {
const keys = this.keys;
const qsIndex = path.indexOf('?');
const pathname = ~qsIndex ? path.slice(0, qsIndex) : path;
const m = this.regexp.exec(decodeURIComponent(pathname));
const m = this.regexp.exec(pathname);
if (!m) {
return false;