react-router icon indicating copy to clipboard operation
react-router copied to clipboard

[Bug]: Absolute URL detection is too aggressive (breaking change from 6.8.0->6.8.1)

Open janruo opened this issue 1 year ago • 0 comments

What version of React Router are you using?

6.22.1

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

janruo avatar Feb 20 '24 15:02 janruo