Within Route.match(), there is the following construction:
m = this.regexp.exec(decodeURIComponent(pathname));
//...
for (var i = 1, len = m.length; i < len; ++i) {
//...
var val = decodeURLEncodedURIComponent(m[i]);
//...
}
As a result, unless the option decodeURLComponents is passed to Page.js, the path is first URI-decoded, and then the individual components are decoded again. As a result, a path which contains a URI-encoded % blows up with an "URIError: URI malformed" message. If the option is passed, the path is decoded, but only before matching, which means that a URI-encoded / confounds the matching.
At a guess, the first decoding is undesirable?
Within Route.match(), there is the following construction:
As a result, unless the option
decodeURLComponentsis passed to Page.js, the path is first URI-decoded, and then the individual components are decoded again. As a result, a path which contains a URI-encoded % blows up with an "URIError: URI malformed" message. If the option is passed, the path is decoded, but only before matching, which means that a URI-encoded / confounds the matching.At a guess, the first decoding is undesirable?