瀏覽代碼

Add macOS shell_open URL escaping

bruvzg 8 年之前
父節點
當前提交
4899d91732
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      platform/osx/os_osx.mm

+ 1 - 1
platform/osx/os_osx.mm

@@ -1483,7 +1483,7 @@ void OS_OSX::make_rendering_thread() {
 
 Error OS_OSX::shell_open(String p_uri) {
 
-	[[NSWorkspace sharedWorkspace] openURL:[[NSURL alloc] initWithString:[NSString stringWithUTF8String:p_uri.utf8().get_data()]]];
+	[[NSWorkspace sharedWorkspace] openURL:[[NSURL alloc] initWithString:[[NSString stringWithUTF8String:p_uri.utf8().get_data()] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]]]];
 	return OK;
 }