Merge pull request #13453 from bruvzg/3.0-uri_escaping

Add macOS shell_open URL escaping
This commit is contained in:
Rémi Verschelde 2017-12-01 15:58:50 +01:00 committed by GitHub
commit 14d1d69916
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}