diff --git a/frontend/src/utils/getQueryParam.js b/frontend/src/utils/getQueryParam.js index 2885b5d1..5f1d0537 100644 --- a/frontend/src/utils/getQueryParam.js +++ b/frontend/src/utils/getQueryParam.js @@ -1,5 +1,5 @@ export default (name) => { - name = name.replace(/[[]/, '\\[').replace(/[\]]/, '\\]'); + name = name.replace(/\[/g, '\\[').replace(/\]/g, '\\]'); const regex = new RegExp('[\\?&]' + name + '=([^&#]*)'); const results = regex.exec(window.location.hash); return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));