Disallow javascript urls in router methods and redirects (#88185)
React already disallows javascript URLs. This change extends this
prohibition to Next.js specific APIs that don't serialize to an href on
an anchor tag. There are workarounds if need be but this is considered a
bugfix because these URLs are non-routable and the affected APIs were
never intended to work with these URLs.
This replaces prior efforts here:
https://github.com/vercel/next.js/pull/64779/ which attempted to make
this capability optional. We decided it was just not supportable and
since workarounds exist the burden of upgrading through this bugfix is
acceptable.
---------
Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>