Closed Bug 1716741 Opened 3 years ago Closed 3 years ago

Percent-encode square brackets when copying from location bar

Categories

(Firefox :: Address Bar, defect)

Firefox 89
defect

Tracking

()

RESOLVED DUPLICATE of bug 1124600

People

(Reporter: psychonaut, Unassigned)

Details

+++ This bug was initially created as a clone of Bug #1716740 +++

When you select and copy text from the location bar that contains special characters, these characters get automatically percent-encoded during the copy. This helpfully turns the human-readable location presented by Firefox into a syntactically valid URI for pasting into other documents/applications. For example, the location text https://www.example.com/this is a test/ gets copied as https://www.example.com/this%20is%20a%20test/.

However, this percent-encoding doesn't happen correctly with square brackets, which per RFC 3986 are permitted only in the host subcomponent, and even then only to specify an IP literal. So for example the location https://[::1]/this[is]a[test] gets incorrectly copied as-is, when it should in fact be copied as https://[::1]/this%5Bis%5Da%5Btest%5D.

Per the discussion at Bug 1716740, this is probably a duplicate of Bug 1124600 (which is itself a regression of Bug 473822).

Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.