From 07ddfc1fea2d0a9d00adacadeaa329230e3472da Mon Sep 17 00:00:00 2001 From: pilot911 Date: Sat, 22 Apr 2017 02:32:09 +0300 Subject: [PATCH 1/2] decodeURI for param item Add decodeURI for param item for excluding break urls --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 712bd093..1b142ef4 100644 --- a/src/index.js +++ b/src/index.js @@ -41,7 +41,7 @@ function regExpResultToParams(match, names) { .slice(1, match.length) .reduce((params, value, index) => { if (params === null) params = {}; - params[names[index]] = value; + params[names[index]] = decodeURI(value); return params; }, null); } From c7b3f9631652c810cce009ea8145d7798a2ffd39 Mon Sep 17 00:00:00 2001 From: pilot911 Date: Sat, 22 Apr 2017 02:40:33 +0300 Subject: [PATCH 2/2] Update index.js --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 1b142ef4..06d05d9f 100644 --- a/src/index.js +++ b/src/index.js @@ -41,7 +41,7 @@ function regExpResultToParams(match, names) { .slice(1, match.length) .reduce((params, value, index) => { if (params === null) params = {}; - params[names[index]] = decodeURI(value); + params[names[index]] = decodeURIComponent(value); return params; }, null); }