diff --git a/lib/url.js b/lib/url.js index 2035f38..04a8181 100644 --- a/lib/url.js +++ b/lib/url.js @@ -333,7 +333,7 @@ Url.prototype.resolve = function (params, options) { value = _.isFunction(value) ? value.call(params) : value; var escapedValue = _.map(String(value).split('/'), function (segment) { - return encodeURIComponent(segment); + return encodeURIComponent(segment).replace(/\*/g, '%A2'); }).join('/'); return slash + escapedValue } @@ -353,7 +353,8 @@ Url.prototype.resolve = function (params, options) { return encodeURIComponent(segment); }).join('/'); } - ); + ) + .replace(/%A2/g, '*'); query = Url.toQueryString(query);