diff options
Diffstat (limited to 'app/assets/javascripts/lib/utils/url_utility.js')
-rw-r--r-- | app/assets/javascripts/lib/utils/url_utility.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/lib/utils/url_utility.js b/app/assets/javascripts/lib/utils/url_utility.js index cc2cf787a8f..5b3aa3cf9dc 100644 --- a/app/assets/javascripts/lib/utils/url_utility.js +++ b/app/assets/javascripts/lib/utils/url_utility.js @@ -473,6 +473,7 @@ export const setUrlParams = ( url = window.location.href, clearParams = false, railsArraySyntax = false, + decodeParams = false, ) => { const urlObj = new URL(url); const queryString = urlObj.search; @@ -495,7 +496,9 @@ export const setUrlParams = ( } }); - urlObj.search = searchParams.toString(); + urlObj.search = decodeParams + ? decodeURIComponent(searchParams.toString()) + : searchParams.toString(); return urlObj.toString(); }; |