Open janruo opened 8 months ago
6.27.0
Render a Link with a value containing colons: <Link to="foo:bar" />
<Link to="foo:bar" />
Colon is an allowed character in URL paths, according to rfc3986. (For example, Wikipedia uses them extensively.)
v6.8.0 is the last version which respects that, and renders an internal route link when given a to value containing colons.
to
v6.8.1 and later treats any to value with colons as an absolute URL and renders an external link.
This change seems to be the original cause: https://github.com/remix-run/react-router/pull/9994
@timdorr @brophdawg11 Any thoughts about this, since you approved the change?
<Link> has the relative prop, but it doesn't help. The absolute detection runs first and the prop is ignored.
<Link>
What version of React Router are you using?
6.27.0
Steps to Reproduce
Render a Link with a value containing colons:
<Link to="foo:bar" />
Expected Behavior
Colon is an allowed character in URL paths, according to rfc3986. (For example, Wikipedia uses them extensively.)
v6.8.0 is the last version which respects that, and renders an internal route link when given a
to
value containing colons.Actual Behavior
v6.8.1 and later treats any
to
value with colons as an absolute URL and renders an external link.This change seems to be the original cause: https://github.com/remix-run/react-router/pull/9994