JSFiddle - React, Tailwind, and code Playground
by lollero
HTML
<script src="https://cdn.jsdelivr.net/npm/[email protected]/url.min.js"></script>
JavaScript
// Assuming redirectURL is encoded by this point...
var url = new Url("http://localhost:8080?test=1&redirectURL=http%3A%2F%2Flocalhost%3A8082%2F%23%2Fabc%3Fparam%3D1");
var redirectUrl = new Url( url.query.redirectURL.replace('/#/', '/') ); // The hashtag is removed
console.log('redirectUrl - (param):', redirectUrl.query.param );