Closed kulmann closed 3 months ago
Since we add the protocol to the file, we can omit the protocol rewrite in packages/web-pkg/src/composables/actions/files/useFileActionsOpenShortcut.ts
I think it still makes sense there. url files which were create with a different application might have been uploaded and not have a protocol in the url, we still want to be able to use them.
Since we add the protocol to the file, we can omit the protocol rewrite in packages/web-pkg/src/composables/actions/files/useFileActionsOpenShortcut.ts
I think it still makes sense there. url files which were create with a different application might have been uploaded and not have a protocol in the url, we still want to be able to use them.
Got you, but then the initial problem, that has been reported is still an issue on the clients side, when a user does this ;)
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code
Description
If the user types a URL without protocol and doesn't click on the proposed URL in the dropdown (which would include
https://
as protocol), the resulting .url file wouldn't have a protocol in the URL. This PR fixes that by enforcinghttps://
as prefix for the user input if none was given. Technically this would've been possible by usingunref(dropItemUrl)
instead ofunref(inputUrl)
, but I've decided to extract the body ofdropItemUrl
into a function and use that, because it would be confusing to usedropItemUrl
as the final input on confirm.Related Issue
Motivation and Context
Enforce url protocol so that mobile clients won't have trouble opening the URLs.
Types of changes