I am using window.location.href to route the page to an external link:
<Route exact path={rootUrl} component={() => { window.location.href =`https://${window.location.hostname}/www/testurl?google=true`; return null; }} />
But this code is throwing Cross-Site Scripting issue during FOD scan. Is there a cleaner way to do this ? Or is there a fix for it ?
Thanks for the help.
I referred this similar question but it didn't help: how to protect location.href from cross site scripting in javascript?