-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Bugfix FXIOS-11569 [Focus URIFixup] Always encode characters in valid URLs #26185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix FXIOS-11569 [Focus URIFixup] Always encode characters in valid URLs #26185
Conversation
@razvanlitianu I haven't done much with Focus, so I'm tagging you here. This looks fine to me and I'd be good to approve, but just making sure. |
Looks like it's failing because Focus lacks the |
That was indeed the case at that point in time, but plan has changed and that's not in the pipeline anymore. Either we adapt the code to do the bugfix in the Focus application, or we start using the |
I went ahead and added the additional I do think it would make sense to move towards a single shared URL-handling class for ease of maintenance. Deciding which other functionality to add (e.g. punycoding, currently only in Firefox's |
lgtm, the only thing is testInvalidURLs() is now failing because some URLs became valid after escaping. |
This PR has been automatically marked as stale. Please leave any comment to keep this PR opened. It will be closed automatically if no further update occurs in the next 7 days. Thank you for your contributions! |
Haven't forgotten about this, I'm hoping to have the time in the next few days. |
This PR has been automatically marked as stale. Please leave any comment to keep this PR opened. It will be closed automatically if no further update occurs in the next 7 days. Thank you for your contributions! |
Think I've figured out the issue I was stuck on, hoping to finish this tonight. |
This PR has been automatically marked as stale. Please leave any comment to keep this PR opened. It will be closed automatically if no further update occurs in the next 7 days. Thank you for your contributions! |
📜 Tickets
Jira ticket
Github issue
💡 Description
Encode spaces and other characters in otherwise-valid URLs using the default scheme instead of rejecting the URL entirely.
This PR replicates the same
URIFixup
changes from PR #25191 in the equivalent Firefox Focus file. I also expanded the unit tests to check that URLs without a scheme are handled correctly. I'm not experienced with this testing framework so please double check that the new function actually gets executed.📝 Checklist
You have to check all boxes before merging
@Mergifyio backport release/v120
)