Open Bug 1964253 Opened 11 days ago Updated 2 days ago

% gets double-URL encoded in URLs when partially selected from start

Categories

(Firefox :: Address Bar, defect, P3)

Firefox 138
Desktop
All
defect

Tracking

()

Tracking Status
firefox139 --- affected
firefox140 --- affected

People

(Reporter: pokechu022, Unassigned)

References

Details

(Whiteboard: [sng])

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0

Steps to reproduce:

  1. Navigate to https://davwebsites.dav.org/SitePages/LocateDepartmentChapter.aspx?RootFolder=%2FLists%2FDeptsandChaptersLinks%2FAlabama
  2. Select the URL
  3. Adjust the selection to only https://davwebsites.dav.org/SitePages/LocateDepartmentChapter.aspx?RootFolder=%2FLists%252FDeptsandChaptersLinks%2F
  4. Copy the URL

Actual results:

The URL that is copied is https://davwebsites.dav.org/SitePages/LocateDepartmentChapter.aspx?RootFolder=%252FLists%252FDeptsandChaptersLinks%252F

Expected results:

Instead of %252F, the URL should be %2F.

This is probably most likely to happen with % in URLs (e.g. https://en.wikipedia.org/w/index.php?title=%25&redirect=no) but any one which has URL encoding is affected (however, if it uses / instead of %2F, this does not happen; https://davwebsites.dav.org/SitePages/LocateDepartmentChapter.aspx uses %2F instead of / though).

This is a regression from 2021-11-26 - almost certainly bug 1539511. That version also made it so that that copying the URL on e.g. https://ru.wikipedia.org/wiki/%D0%97%D0%B0%D0%B3%D0%BB%D0%B0%D0%B2%D0%BD%D0%B0%D1%8F_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 will still URL encode if part of the URL is selected from the start (e.g. https to Заглавная), but if the start isn't selected then it doesn't encode (e.g. if just Заглавная_страница is selected). This initially surprised me but seems to be intended behavior based on bug 1539511.

The Bugbug bot thinks this bug should belong to the 'Core::Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Networking
Product: Firefox → Core
Component: Networking → Address Bar
Product: Core → Firefox

I was able to reproduce the issue on Win11x64 using Firefox build 139.0b4. If I copy link that ends in '%2F' it loads as '%252F' in different tab. Though the sites do not load.
Marking issue as new.

Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
OS: Unspecified → All
QA Contact: mchiorean
Hardware: Unspecified → Desktop
Severity: -- → S3
Priority: -- → P3
Whiteboard: [sng]
You need to log in before you can comment on or make changes to this bug.