From a17b2df580d7df9004d116c66b4c9c365125784a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 22 May 2026 07:57:41 +0530 Subject: [PATCH] Fix #10054 --- docs/changelog.rst | 2 ++ glfw/cocoa_window.m | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index d632838ca..e23e54bc9 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m index 794589282..c72a89dbb 100644 --- a/glfw/cocoa_window.m +++ b/glfw/cocoa_window.m @@ -1670,12 +1670,9 @@ - (BOOL) prepareForDragOperation:(id) sender { static void create_uri_list(_GLFWDropData *d, NSArray *urls) { NSMutableArray *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];