Please use the [querystring module](resources\wikia\modules\querystring.js) here, it's meant for doing exactly the same thing