This commit is contained in:
Kovid Goyal 2026-05-22 07:57:41 +05:30
parent 270c553af6
commit a17b2df580
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 3 additions and 4 deletions

View file

@ -178,6 +178,8 @@ Detailed list of changes
- Fix a regression in the previous release that caused :ac:`copy_or_noop` to stop working correctly (:pull:`10041`)
- macOS: Fix a regression in the previous release that caused URLs to be quoted when dropping into shells (:iss:`10054`)
0.47.0 [2026-05-19]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -1670,12 +1670,9 @@ - (BOOL) prepareForDragOperation:(id<NSDraggingInfo>) sender {
static void
create_uri_list(_GLFWDropData *d, NSArray *urls) {
NSMutableArray<NSString *> *items = [NSMutableArray array];
NSCharacterSet *allowedChars = [NSCharacterSet URLQueryAllowedCharacterSet];
for (NSURL *url in urls) {
if ([url isFileURL]) url = [url filePathURL];
NSString *absoluteString = url.absoluteString;
NSString *q = [absoluteString stringByAddingPercentEncodingWithAllowedCharacters:allowedChars];
[items addObject:q];
[items addObject:url.absoluteString];
}
NSString *result = [items componentsJoinedByString:@"\r\n"];
NSData *data = [result dataUsingEncoding:NSUTF8StringEncoding];